import { useState } from 'react' import { Outlet, NavLink, useNavigate, Link } from 'react-router-dom' import { useAuth } from '../context/AuthContext' import { useTheme } from '../context/ThemeContext' const NAV_MAIN = [ { to: '/app/dashboard', icon: '◈', label: 'Dashboard' }, { to: '/app/assess', icon: '⊕', label: 'New Assessment' }, { to: '/app/history', icon: '◷', label: 'History' }, ] const NAV_WELLNESS = [ { to: '/app/breathe', icon: '🫁', label: 'Breathe Hub' }, { to: '/app/gratitude', icon: '✍️', label: 'Gratitude' }, { to: '/app/todo', icon: '✅', label: 'Daily To-Do' }, ] export default function Layout() { const { user, logout } = useAuth() const { theme, toggle } = useTheme() const navigate = useNavigate() const [open, setOpen] = useState(false) // mobile sidebar async function handleLogout() { await logout() navigate('/auth') } const initials = user?.username?.slice(0, 2).toUpperCase() || 'U' return (