1+ import {
2+ SidebarContent ,
3+ SidebarFooter ,
4+ SidebarHeader ,
5+ SidebarMenu ,
6+ SidebarMenuItem ,
7+ } from '@web/components/ui/sidebar' ;
18import { useI18n } from '@web/i18n' ;
2- import type { AppSurfaceId , NavigationItem } from '@web/layout/types' ;
3- import { SettingsMenu } from './SettingsMenu' ;
4- import { SidebarLink } from './SidebarLink' ;
9+ import type { AppRoute } from '@web/layout/routes' ;
10+ import type { AppSurfaceId } from '@web/layout/types' ;
11+ import { MainNavigationSection } from './MainNavigationSection' ;
12+ import { SidebarContentRegion } from './SidebarContentRegion' ;
13+ import { SidebarSettingsEntry } from './SidebarSettingsEntry' ;
514
615interface AppNavigationProps {
716 activeItemId : AppSurfaceId ;
8- items : readonly NavigationItem [ ] ;
17+ items : readonly AppRoute [ ] ;
918 onOpenSettings : ( ) => void ;
1019}
1120
@@ -16,21 +25,22 @@ export function AppNavigation({ activeItemId, items, onOpenSettings }: AppNaviga
1625
1726 return (
1827 < >
19- < div className = "border-b px-3 py-2 text-sm font-medium text-foreground" > Heddle</ div >
20- < nav className = "grid gap-1 p-2" aria-label = { t ( 'navigation.mainAriaLabel' ) } >
21- { items . map ( ( item ) => (
22- < SidebarLink
23- key = { item . id }
24- active = { item . id === activeItemId }
25- href = { item . href }
26- label = { t ( item . labelKey ) }
27- />
28- ) ) }
29- </ nav >
30- < div className = "min-h-0 flex-1 border-t bg-background" aria-label = { t ( 'navigation.sessionListAriaLabel' ) } />
31- < div className = "border-t p-2" >
32- < SettingsMenu onOpenSettings = { onOpenSettings } />
33- </ div >
28+ < SidebarHeader className = "v2-panel-divider h-12 justify-center border-b px-2 py-0" >
29+ < div className = "flex items-center gap-2" >
30+ < span className = "text-sm font-medium text-foreground" > Heddle</ span >
31+ </ div >
32+ </ SidebarHeader >
33+ < MainNavigationSection activeItemId = { activeItemId } items = { items } />
34+ < SidebarContent >
35+ < SidebarContentRegion ariaLabel = { t ( 'navigation.sessionListAriaLabel' ) } />
36+ </ SidebarContent >
37+ < SidebarFooter className = "v2-panel-divider border-t p-1.5" >
38+ < SidebarMenu >
39+ < SidebarMenuItem >
40+ < SidebarSettingsEntry onOpenSettings = { onOpenSettings } />
41+ </ SidebarMenuItem >
42+ </ SidebarMenu >
43+ </ SidebarFooter >
3444 </ >
3545 ) ;
3646}
0 commit comments