import { SidebarGroup, SidebarGroupLabel, SidebarMenu, SidebarMenuButton, SidebarMenuItem } from '@/components/ui/sidebar'; import { type NavItem, type SharedData } from '@/types'; import { Link, usePage } from '@inertiajs/react'; export function NavMain({ items = [] }: { items: NavItem[] }) { const page = usePage(); const { translations } = page.props; const navigationTranslations = translations && typeof translations.dashboard === 'object' && translations.dashboard !== null ? (translations.dashboard as Record).navigation : null; const groupLabelValue = navigationTranslations && typeof navigationTranslations === 'object' && navigationTranslations !== null ? (navigationTranslations as Record).group_label : null; const groupLabel = typeof groupLabelValue === 'string' ? groupLabelValue : 'Kundenbereich'; return ( {groupLabel} {items.map((item) => ( {item.icon && } {item.title} ))} ); }