'use client'; import { CategoryBlock } from './CategoryBlock'; import { SchemaSection } from './SchemaSection'; import type { NavigateFn, SidebarBodyVM } from './types'; interface SidebarBodyProps { body: SidebarBodyVM; onNavigate: NavigateFn; } /** Scrollable body of the sidebar. Picks the rendering strategy based * on ``body.kind`` — flat category list for single-schema mode, * nested schema sections for multi-schema mode — and falls back to * a centred empty-state message when the filter pipeline yields no * rows. */ export function SidebarBody({ body, onNavigate }: SidebarBodyProps) { if (body.kind === 'flat') { if (body.categories.length === 0) { return (