"use client"; import { RiArrowLeftRightLine, RiBankCard2Line, RiBankLine, RiCalendarEventLine, RiDashboardLine, RiFileChartLine, RiFundsLine, RiGroupLine, RiInboxLine, RiMenuLine, RiPriceTag3Line, RiSparklingLine, RiTodoLine, } from "@remixicon/react"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { useState } from "react"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { NavigationMenu, NavigationMenuContent, NavigationMenuItem, NavigationMenuList, NavigationMenuTrigger, } from "@/components/ui/navigation-menu"; import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger, } from "@/components/ui/sheet"; import { cn } from "@/lib/utils/ui"; type TopNavMenuProps = { preLancamentosCount?: number; }; const triggerClass = "!bg-transparent !text-primary-foreground/90 hover:!bg-primary-foreground/15 hover:!text-primary-foreground focus:!bg-primary-foreground/15 focus:!text-primary-foreground data-[state=open]:!bg-primary-foreground/20 data-[state=open]:!text-primary-foreground"; function SimpleNavLink({ href, children, }: { href: string; children: React.ReactNode; }) { const pathname = usePathname(); const isActive = href === "/dashboard" ? pathname === href : pathname === href || pathname.startsWith(`${href}/`); return ( {children} ); } type DropdownLinkItem = { href: string; label: string; icon: React.ReactNode; badge?: number; }; function DropdownLinkList({ items }: { items: DropdownLinkItem[] }) { return (
{label}
); } export function TopNavMenu({ preLancamentosCount = 0 }: TopNavMenuProps) { const [sheetOpen, setSheetOpen] = useState(false); const close = () => setSheetOpen(false); const lancamentosItems: DropdownLinkItem[] = [ { href: "/lancamentos", label: "Lançamentos", icon: