import Link from "next/link"; import React from "react"; export default function NavUI({ menu = [], color = "#fab758" }) { const filterHeaderMenu = (items) => { return items.filter(item => item.position === 'Header'); }; const renderMenu = (items, level = 0) => { if (level === 0) items = filterHeaderMenu(items); return items.map((item) => { const hasChildren = item.children && item.children.length > 0; const hasHref = !!item.href && item.href !== "#"; if (hasChildren) { return (
  • 0 ? " dropdown-submenu dropend" : ""}`}>
    {hasHref && ( 0 ? "dropdown-item" : "nav-link"} !text-[.7rem] !tracking-[normal] hover:!text-[var(--current-color)] after:!text-[var(--current-color)]`} href={item.href} style={{ paddingRight: 0 }} > {item.label} )} 0 ? "dropdown-item" : "nav-link") + " dropdown-toggle"} !text-[.7rem] !tracking-[normal] hover:!text-[var(--current-color)] after:!text-[var(--current-color)]`} href="#" data-bs-toggle="dropdown" aria-expanded="false" style={hasHref ? { paddingLeft: 8, minWidth: 24 } : {}} > {hasHref ? 展开 : item.label}
  • ); } else { return (
  • 0 ? "dropdown-item" : "nav-link"} !text-[.7rem] !tracking-[normal] hover:!text-[var(--current-color)] after:!text-[var(--current-color)]`} href={item.href || "#"} > {item.label}
  • ); } }); }; return ( ); }