import { useState } from 'react'; import { useNodes } from '../hooks/useNodes'; import SearchBar from './SearchBar'; import type { NodeKind } from '../types'; const KINDS: (NodeKind | '')[] = ['', 'memory', 'component', 'task', 'decision']; export default function Sidebar({ selectedId, onSelect, onAddNode, onClose, }: { selectedId: string | null; onSelect: (id: string) => void; onAddNode: () => void; onClose: () => void; }) { const [kindFilter, setKindFilter] = useState(''); const { data: nodes, isLoading } = useNodes(kindFilter ? { kind: kindFilter } : undefined); return ( ); }