import { Outlet } from 'react-router-dom' import { AnimatePresence, motion } from 'framer-motion' import clsx from 'clsx' import { LayoutSidebarContent, type LayoutSidebarContentProps } from './LayoutSidebarContent' import { isPlayerRoute } from './layoutNavigation' 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 sidebarVariant?: 'media' | 'admin' } type LayoutWorkspaceProps = { routeKey: string showMobileBottomNav?: boolean } 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, sidebarVariant = 'admin', }: LayoutSidebarsProps) { const content = ( sidebar.setIsMobileDrawerOpen(false)} variant={sidebarVariant} /> ) if (!showSidebar) { return ( <> sidebar.setIsMobileDrawerOpen(false)} > {content} ) } return ( <> {content} sidebar.setIsMobileDrawerOpen(false)} > {content} ) } export function LayoutWorkspace({ routeKey, showMobileBottomNav = false }: LayoutWorkspaceProps) { const bottomPad = showMobileBottomNav ? 'pb-[calc(3.75rem+env(safe-area-inset-bottom,0px))] lg:pb-10' : '' if (isPlayerRoute(routeKey)) { return (
) } return (
) } export { LayoutSidebarContent }