import { NavLink, useParams } from 'react-router'; import { Server, Play, Container, AppWindow, Settings, CloudLightning, Sun, Moon, Monitor, ChevronDown, Globe, Wifi, HardDrive, Usb } from 'lucide-react'; import { cn } from '../lib/utils'; import { Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMenu, SidebarMenuButton, SidebarMenuItem, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarRail, } from './ui/sidebar'; import { Collapsible, CollapsibleContent, CollapsibleTrigger } from './ui/collapsible'; import { useTheme } from '../contexts/ThemeContext'; export function AppSidebar() { const { theme, setTheme } = useTheme(); const { instanceId } = useParams<{ instanceId: string }>(); const cycleTheme = () => { if (theme === 'light') { setTheme('dark'); } else if (theme === 'dark') { setTheme('system'); } else { setTheme('light'); } }; const getThemeIcon = () => { switch (theme) { case 'light': return ; case 'dark': return ; default: return ; } }; const getThemeLabel = () => { switch (theme) { case 'light': return 'Light mode'; case 'dark': return 'Dark mode'; default: return 'System theme'; } }; // If no instanceId, we're not in an instance context if (!instanceId) { return null; } return (

Wild Cloud

{instanceId}

{({ isActive }) => (
Dashboard
)}
{({ isActive }) => (
Cloud
)}
Central isActive ? "data-[active=true]" : ""}>
Central
DNS
DHCP
PXE
ISO / USB
Cluster
Cluster Nodes
Cluster Services
Apps
Advanced
{getThemeIcon()} {getThemeLabel()}
); }