import { Outlet } from '@tanstack/react-router' import { getCookie } from '@/lib/cookies' import { cn } from '@/lib/utils' import { LayoutProvider } from '@/context/layout-context' import { SearchProvider } from '@/context/search-context' import { SidebarContent, SidebarFooter, SidebarHeader, SidebarInset, SidebarProvider, SidebarRail, } from '@/components/ui/sidebar' import { AppSidebar } from '@/components/layout/app-sidebar' import { SkipToMain } from '@/components/skip-to-main' import { sidebarData } from './data/sidebar-data' import { NavGroup } from './nav-group' import { NavUser } from './nav-user' import { TeamSwitcher } from './team-switcher' interface Props { children?: React.ReactNode } export function AuthenticatedLayout({ children }: Props) { const defaultOpen = getCookie('sidebar_state') !== 'false' return ( {sidebarData.navGroups.map((props) => ( ))} {children ?? } ) }