import React from 'react';
import { Outlet } from 'react-router-dom';
import { useAuth } from '@/contexts/useAuth';
import { useIsMobile } from '@/hooks/use-mobile';
import { useAppShell } from '@/business/app-shell/hooks';
import { AppFooter } from '@/components/app-shell/AppFooter';
import { AppShellSkeleton } from '@/components/ui/app-shell-skeleton';
import Sidebar from '@/components/frameworks/Sidebar';
import TopBar from '@/components/frameworks/TopBar';
const AppLayout: React.FC = () => {
const { user, profile, loading: authLoading } = useAuth();
const isMobile = useIsMobile();
const {
mobileOverlayVisible,
sidebarProps,
topBarProps,
shellOutletContext,
footerProps,
setMobileSidebarOpen,
} = useAppShell({ user, profile, isMobile });
if (authLoading) {
return