import { SidebarProvider } from '@/components/ui/sidebar'; import { useLayout } from '@/contexts/LayoutContext'; import { FloatingChatGpt } from '@/components/FloatingChatGpt'; import { cn } from '@/lib/utils'; import { useState } from 'react'; import CookieConsentBanner from '@/components/CookieConsentBanner'; interface AppShellProps { children: React.ReactNode; variant?: 'header' | 'sidebar'; } export function AppShell({ children, variant = 'header' }: AppShellProps) { const [isOpen, setIsOpen] = useState(() => (typeof window !== 'undefined' ? localStorage.getItem('sidebar') !== 'false' : true)); const handleSidebarChange = (open: boolean) => { setIsOpen(open); if (typeof window !== 'undefined') { localStorage.setItem('sidebar', String(open)); } }; if (variant === 'header') { return (
{children}
); } const { position } = useLayout(); return (
{children}
); }