import React, { useState } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; import { LayoutDashboard, BookOpen, Bookmark, Settings, LogOut, Search, Bell, Menu, X, ChevronRight, TrendingUp, User, Activity, Award } from 'lucide-react'; import { Link, useLocation, useNavigate } from 'react-router-dom'; import { useAppContext } from '../../context/AppContext'; interface DashboardLayoutProps { children: React.ReactNode; } const sidebarItems = [ { icon: LayoutDashboard, label: 'Dashboard', path: '/dashboard' }, { icon: BookOpen, label: 'Navigator', path: '/navigator' }, { icon: Bookmark, label: 'Resources', path: '/resources' }, { icon: Settings, label: 'Settings', path: '#' }, ]; export const DashboardLayout: React.FC = ({ children }) => { const [isSidebarOpen, setIsSidebarOpen] = useState(true); const [isMobileMenuOpen, setIsMobileMenuOpen] = useState(false); const location = useLocation(); const navigate = useNavigate(); const [isSettingsOpen, setIsSettingsOpen] = useState(false); const [isProfileOpen, setIsProfileOpen] = useState(false); const [isNotificationsOpen, setIsNotificationsOpen] = useState(false); const { agent, levelUpMessage, setLevelUpMessage, notifications, markNotificationsAsRead } = useAppContext(); const progressPercent = agent.totalReward % 100; const unreadCount = notifications.filter(n => !n.read).length; const handleSignOut = () => { // Basic sign out navigate('/login'); }; return (
{/* Background Blobs - Subtle & Airy */}
{/* Sidebar - Desktop */}
{isSidebarOpen && ( Navigated Learning )}
{/* Toggle Button */}
{/* Main Content Area */}
{/* Navbar */}

Learner

{progressPercent}% SYNC

setIsProfileOpen(true)} className="w-11 h-11 rounded-2xl bg-gradient-to-tr from-brand to-brand-light p-0.5 shadow-lg shadow-brand/20 cursor-pointer" >
Avatar
{/* Scrollable Content */}
{children}
{/* Mobile Menu Overlay */} {isMobileMenuOpen && ( <> setIsMobileMenuOpen(false)} className="fixed inset-0 bg-black/60 backdrop-blur-sm z-40 lg:hidden" />
Navigated Learning
)}