import Link from "next/link"; import { ArrowUpRight } from "lucide-react"; import { HoverCard, HoverCardContent, HoverCardTrigger, } from "@/components/ui/hover-card"; import type { DropdownItem, NavItem } from "@/lib/constants"; function DropdownLink({ link }: { link: DropdownItem }) { const className = "hover:bg-muted flex flex-col rounded-md px-2 py-1.5 transition-colors"; if (link.external) { return ( {link.label} {link.description} ); } return ( {link.label} {link.description} ); } export function NavItems({ items, megaAlign = "start", }: { items: NavItem[]; megaAlign?: "start" | "end"; }) { return items.map((item) => { if (item.type === "link") { return ( {item.label} ); } const trigger = ( ); return ( {trigger}
{item.groups.map((group) => (
{group.label} {group.items.map((link) => ( ))}
))}
); }); }