import React, { useEffect } from 'react'; import { Outlet } from 'react-router-dom'; import { useDemoStore } from '../../mock/store'; import { Sidebar } from '../shell/Sidebar'; import { Topbar } from '../shell/Topbar'; import { RightCommandPanel } from '../shell/RightCommandPanel'; import { BottomNav } from '../shell/BottomNav'; import { CommandPalette } from '../shell/CommandPalette'; import { QuickActionsModal } from '../shell/QuickActionsModal'; import { NotificationsDrawer } from '../shell/NotificationsDrawer'; import { Drawer, Button } from '../../shared/ui'; export const AppShell: React.FC = () => { const { theme, viewportMode, isAiDrawerOpen, setIsAiDrawerOpen, getActiveProfile, activeLocation, } = useDemoStore(); const profile = getActiveProfile(); useEffect(() => { document.documentElement.setAttribute('data-theme', theme); }, [theme]); // Viewport mode constraints const getViewportContainerStyles = () => { switch (viewportMode) { case 'mobile': return 'max-w-[420px] h-[880px] my-6 border-8 border-[#3A3D35] rounded-[36px] overflow-hidden shadow-2xl relative'; case 'tablet-portrait': return 'max-w-[820px] h-[1050px] my-6 border-8 border-[#3A3D35] rounded-[28px] overflow-hidden shadow-2xl relative'; case 'tablet-landscape': return 'max-w-[1180px] h-[800px] my-6 border-8 border-[#3A3D35] rounded-[24px] overflow-hidden shadow-2xl relative'; case 'desktop': default: return 'w-full min-h-screen'; } }; const isEmulatedDevice = viewportMode !== 'desktop'; const showMobileNav = viewportMode === 'mobile'; return (