import { ChevronRight } from 'lucide-react'; import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible'; import { SidebarGroup, SidebarGroupLabel, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, } from '@/components/ui/sidebar'; import { type NavGroup } from '@/types'; import { Link, usePage } from '@inertiajs/react'; export function NavMain({ navGroup }: { navGroup: NavGroup }) { const page = usePage(); return ( Platform {navGroup.items.map((navItem) => navItem.type === 'group' ? ( subItem.href === page.url)} className="group/collapsible" > {navItem.icon && } {navItem.title} {navItem.items?.map((subItem) => ( {subItem.title} ))} ) : ( {navItem.icon && } {navItem.title} ), )} ); }