import type { User } from './data'; import { Avatar } from './Shared'; import { RoleBadge } from './Shared'; const NAV_ITEMS = [ { id: 'dashboard', icon: '⊞', label: 'Dashboard', roles: ['cto', 'manager', 'employee'] }, { id: 'calendar', icon: '📅', label: 'Calendar', roles: ['cto', 'manager', 'employee'] }, { id: 'kanban', icon: '▦', label: 'Kanban Board', roles: ['cto', 'manager', 'employee'] }, { id: 'mytasks', icon: '✓', label: 'My Tasks', roles: ['employee'] }, { id: 'teamtasks', icon: '👥', label: 'Team Tasks', roles: ['cto', 'manager'] }, { id: 'reports', icon: '📊', label: 'Reports', roles: ['cto', 'manager'] }, { id: 'members', icon: '👤', label: 'Members', roles: ['cto'] }, ]; interface SidebarProps { currentUser: User; activePage: string; onNavigate: (page: string) => void; onSignOut: () => void; isOpen: boolean; onClose: () => void; } export function Sidebar({ currentUser, activePage, onNavigate, onSignOut, isOpen, onClose }: SidebarProps) { const filteredNav = NAV_ITEMS.filter(n => n.roles.includes(currentUser.role)); return ( <> {isOpen &&
}