import { Outlet } from 'react-router-dom' import { AnimatePresence, motion } from 'framer-motion' import clsx from 'clsx' import { LayoutSidebarContent, type LayoutSidebarContentProps } from './LayoutSidebarContent' import { RouteErrorBoundary } from './RouteErrorBoundary' import type { useLayoutSidebar } from './useLayoutSidebar' type LayoutSidebarState = ReturnType type LayoutSidebarProps = { children: React.ReactNode isSidebarOpen: boolean } type LayoutMobileSidebarProps = { children: React.ReactNode isOpen: boolean onClose: () => void } type LayoutSidebarsProps = Omit< LayoutSidebarContentProps, 'isSidebarOpen' | 'isMobileDrawerOpen' | 'onToggleSidebar' | 'onCloseMobileDrawer' > & { sidebar: LayoutSidebarState showSidebar: boolean } type LayoutWorkspaceProps = { routeKey: string } export { LayoutHeader } from './LayoutHeaderSections' export function LayoutDesktopSidebar({ children, isSidebarOpen }: LayoutSidebarProps) { return ( ) } export function LayoutMobileSidebar({ children, isOpen, onClose }: LayoutMobileSidebarProps) { return ( {isOpen && (
{children}
)}
) } export function LayoutSidebars({ sidebar, isAdmin, can, showSidebar, }: LayoutSidebarsProps) { const content = ( sidebar.setIsMobileDrawerOpen(false)} /> ) if (!showSidebar) { return ( <> sidebar.setIsMobileDrawerOpen(false)} > {content} ) } return ( <> {content} sidebar.setIsMobileDrawerOpen(false)} > {content} ) } export function LayoutWorkspace({ routeKey }: LayoutWorkspaceProps) { if (routeKey.startsWith('/play')) { return (
) } return (
) } export { LayoutSidebarContent }