'use client'; import { ConnectedSelectionBadge } from '@/components/ui/treatment/ConnectedSelectionBadge'; import { formatToothList, prosthesisTypeColorFromCatalog, } from '@/components/treatment/prosthesisTypeDisplay'; import type { ProsthesisCatalogEntry } from '@/types/treatment-catalog'; export type LabCaseProsthesisGroup = { prosthesisTypeCode: string; teeth: string[]; connected?: boolean; selectionGroupId?: string; }; interface LabCaseProsthesisGroupsListProps { groups: LabCaseProsthesisGroup[]; prosthesisCatalog: readonly ProsthesisCatalogEntry[]; fallbackTeeth?: string[]; } function prosthesisLabel(code: string, catalog: readonly ProsthesisCatalogEntry[]): string { return catalog.find((entry) => entry.code === code)?.label ?? code; } export function LabCaseProsthesisGroupsList({ groups, prosthesisCatalog, fallbackTeeth = [], }: LabCaseProsthesisGroupsListProps) { if (groups.length > 0) { return ( ); } if (fallbackTeeth.length > 0) { return

{formatToothList(fallbackTeeth)}

; } return null; }