import { Link } from '@inertiajs/react'; import { SidebarGroup, SidebarGroupLabel, SidebarMenu, SidebarMenuButton, SidebarMenuItem, } from '@/components/ui/sidebar'; import { useCurrentUrl } from '@/hooks/use-current-url'; import { toUrl } from '@/lib/utils'; import type { NavItem } from '@/types'; export function NavMain({ items, title = 'Navegação', }: { items: NavItem[]; title?: string; }) { const { isCurrentOrParentUrl, currentUrl } = useCurrentUrl(); const receivingOrder = /^\/ordens\/\d+\/recepcoes/.test(currentUrl); return ( {title} {items.map((item) => ( {item.fullPage ? ( {item.icon && } {item.title} ) : ( {item.icon && } {item.title} )} ))} ); }