import { useStore } from '@nanostores/react' import { $router } from '../../stores/router' import { Icons, type IconComponent } from '../shared/Icons' interface NavItem { route: string label: string Icon: IconComponent } interface NavSection { title: string items: NavItem[] } const navigation: NavSection[] = [ { title: '', items: [ { route: 'home', label: 'Home', Icon: Icons.Home }, ], }, { title: 'Content', items: [ { route: 'posts', label: 'Posts', Icon: Icons.Posts }, { route: 'analytics', label: 'Analytics', Icon: Icons.Analytics }, ], }, { title: 'Site', items: [ { route: 'general', label: 'General', Icon: Icons.Settings }, { route: 'design', label: 'Design', Icon: Icons.Design }, { route: 'domain', label: 'Domain', Icon: Icons.Domain }, ], }, { title: 'Readers', items: [ { route: 'engagement', label: 'Engagement', Icon: Icons.Engagement }, { route: 'monetization', label: 'Monetization', Icon: Icons.Monetization }, ], }, { title: 'Developer', items: [ { route: 'plugins', label: 'Plugins', Icon: Icons.Code }, { route: 'api', label: 'API Keys', Icon: Icons.ApiKeys }, { route: 'data', label: 'Data', Icon: Icons.Data }, ], }, { title: 'Account', items: [ { route: 'billing', label: 'Billing', Icon: Icons.Billing }, ], }, ] export function Sidebar() { const page = useStore($router) const currentRoute = page?.route ?? 'posts' return ( ) }