import { useState } from 'react' import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select' import { Separator } from '@/components/ui/separator' import { ChartBar, Buildings, MapTrifold, Question, PuzzlePiece, Code } from '@phosphor-icons/react' import { NavItem } from '@/components/nav/NavItem' import { CoreOperationsNav, ReportsNav, ConfigurationNav, ToolsNav } from '@/components/nav/nav-sections' import type { View } from '@/App' import type { DashboardMetrics } from '@/lib/types' interface SidebarProps { currentView: View setCurrentView: (view: View) => void currentEntity: string setCurrentEntity: (entity: string) => void metrics: DashboardMetrics } export function Sidebar({ currentView, setCurrentView, currentEntity, setCurrentEntity, metrics }: SidebarProps) { const [expandedGroups, setExpandedGroups] = useState>(new Set(['core'])) const toggleGroup = (groupId: string) => { setExpandedGroups(prev => { const next = new Set(prev) if (next.has(groupId)) { next.delete(groupId) } else { next.add(groupId) } return next }) } return ( ) }