import React, { useState } from 'react' import { AppBar, Box, CssBaseline, Drawer, IconButton, List, ListItem, ListItemButton, ListItemIcon, ListItemText, Toolbar, Typography, useTheme, LinearProgress, Button, } from '@mui/material' import { Menu as MenuIcon, Dashboard as DashboardIcon, List as ListIcon, Add as AddIcon, Settings as SettingsIcon, } from '@mui/icons-material' import { Link } from 'react-router' const drawerWidth = 240 interface LayoutProps { children: React.ReactNode loading?: boolean } export default function Layout({ children, loading = false }: LayoutProps) { const theme = useTheme() const [mobileOpen, setMobileOpen] = useState(false) const handleDrawerToggle = () => { setMobileOpen(!mobileOpen) } const menuItems = [ { text: 'Dashboard', icon: , path: '/', }, { text: 'All Tasks', icon: , path: '/all-tasks', }, { text: 'Settings', icon: , path: '/settings', }, ] const drawer = (
{menuItems.map(item => ( {item.icon} ))}
) return ( {/* Loading indicator */} {loading && ( )} {/* App Bar */} ⚓ Captain's Log {/* Drawer */} {/* Mobile drawer */} {drawer} {/* Desktop drawer */} {drawer} {/* Main content */} {children} ) }