'use client' import { ChevronDown, ChevronRight } from 'lucide-react' import { DataPoint, DataPointCategory, SupportedLanguage, CATEGORY_METADATA, } from '@/lib/sdk/einwilligungen/types' import { CategoryIcon } from './DataPointCatalogHelpers' import { DataPointRow } from './DataPointRow' interface DataPointCategoryGroupProps { category: DataPointCategory categoryDataPoints: DataPoint[] selectedIds: string[] isExpanded: boolean readOnly: boolean language: SupportedLanguage onToggleCategory: (category: DataPointCategory) => void onToggleDataPoint: (id: string) => void } export function DataPointCategoryGroup({ category, categoryDataPoints, selectedIds, isExpanded, readOnly, language, onToggleCategory, onToggleDataPoint, }: DataPointCategoryGroupProps) { const meta = CATEGORY_METADATA[category] const selectedInCategory = categoryDataPoints.filter((dp) => selectedIds.includes(dp.id) ).length return (
{/* Category Header */} {/* Data Points List */} {isExpanded && (
{categoryDataPoints.map((dp) => ( ))}
)}
) }