"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import type { NavGroup } from "@/lib/nav"; import { cn } from "@/lib/utils"; interface NavLinksProps { groups: NavGroup[]; badgeCount?: number; onNavigate?: () => void; compact?: boolean; } export function NavLinks({ groups, badgeCount = 0, onNavigate, compact }: NavLinksProps) { const pathname = usePathname(); return (
{groups.map((group, groupIndex) => (
{groupIndex > 0 &&
}

{group.label}

    {group.items.map((item) => { const active = pathname === item.href; const Icon = item.icon; const badge = item.showBadge && badgeCount > 0 ? badgeCount : 0; return (
  • {item.label} {badge > 0 && ( {badge > 99 ? "99+" : badge} )}
  • ); })}
))}
); }