import { useState } from 'react'; import { Link, useLocation, useNavigate } from 'react-router-dom'; import { Inbox, Calendar, CalendarDays, Plus, ChevronDown, ChevronRight, Hash, Settings, LogOut, User, FolderPlus, Tag } from 'lucide-react'; import { cn } from '@/lib/utils'; import { useAuthStore } from '@/stores/auth'; import { useTasksStore } from '@/stores/tasks'; export function Sidebar() { const location = useLocation(); const navigate = useNavigate(); const { user, logout } = useAuthStore(); const { projects, labels } = useTasksStore(); const [projectsExpanded, setProjectsExpanded] = useState(true); const [labelsExpanded, setLabelsExpanded] = useState(true); const handleLogout = async () => { await logout(); navigate('/login'); }; const inbox = projects.find(p => p.isInbox); const regularProjects = projects.filter(p => !p.isInbox); const navItems = [ { path: '/inbox', icon: Inbox, label: 'Inbox', color: '#3b82f6' }, { path: '/today', icon: Calendar, label: 'Today', color: '#22c55e' }, { path: '/upcoming', icon: CalendarDays, label: 'Upcoming', color: '#8b5cf6' }, ]; return ( ); }