'use client'; /** * Lab Sidebar - Filter Panel * * Narrow left sidebar for filtering lab content. * Matches DocsSidebar visual style with collapsible filter sections. * * Features: * - Multiple filter groups (Status, Date Range, Source Type) * - Collapsible sections * - Checkbox/radio button controls * - Clean, minimal design */ import { useState } from 'react'; import { FilterPlaceholder } from '@/components/lab/FilterPlaceholder'; type FilterGroupProps = { id: string; label: string; icon: string; options: Array<{ id: string; label: string; count?: number }>; multiSelect?: boolean; }; const filterGroups: FilterGroupProps[] = [ { id: 'status', label: 'Status', icon: '📊', options: [ { id: 'all', label: 'All', count: 127 }, { id: 'completed', label: 'Completed', count: 98 }, { id: 'pending', label: 'Pending', count: 23 }, { id: 'failed', label: 'Failed', count: 6 }, ], multiSelect: false, }, { id: 'date', label: 'Date Range', icon: '📅', options: [ { id: 'today', label: 'Today', count: 12 }, { id: 'week', label: 'Last 7 days', count: 45 }, { id: 'month', label: 'Last 30 days', count: 89 }, { id: 'all-time', label: 'All time', count: 127 }, ], multiSelect: false, }, { id: 'source', label: 'Source Type', icon: '🎨', options: [ { id: 'text', label: 'Text-to-Image', count: 78 }, { id: 'upload', label: 'Uploads', count: 34 }, { id: 'reference', label: 'Reference Images', count: 15 }, ], multiSelect: true, }, ]; export const LabSidebar = () => { const [expandedSections, setExpandedSections] = useState(['status', 'date', 'source']); const toggleSection = (id: string) => { setExpandedSections((prev) => prev.includes(id) ? prev.filter((item) => item !== id) : [...prev, id] ); }; const isExpanded = (id: string) => expandedSections.includes(id); return ( ); };