import { Outlet, NavLink, useLocation } from 'react-router-dom'; import { useAuth } from '../contexts/AuthContext'; import ThemeToggle from './ThemeToggle'; import { Calendar, Clock, Shield, LogOut, Menu, X, User } from 'lucide-react'; import { useState } from 'react'; export default function Layout() { const { user, logout, isAdmin } = useAuth(); const [menuOpen, setMenuOpen] = useState(false); const location = useLocation(); const navItems = [ { to: '/', icon: Clock, label: 'Timesheet' }, { to: '/history', icon: Calendar, label: 'History' }, { to: '/profile', icon: User, label: 'Account' }, ...(isAdmin ? [{ to: '/admin', icon: Shield, label: 'Admin' }] : []), ]; return (