import { cn } from '../lib/utils' import type { DiameterGroup } from '../lib/types' import { t } from '../lib/i18n' import type { Lang } from '../lib/types' interface Props { lang: Lang groups: DiameterGroup[] counts: Record selectedGroupId: number onSelectGroup: (id: number) => void onExpectedChange: (groupId: number, value: number | undefined) => void } export function GroupPanel({ lang, groups, counts, selectedGroupId, onSelectGroup, onExpectedChange, }: Props) { return (

{t(lang, 'groups')}

{groups.map((g, idx) => { const count = counts[g.id] ?? 0 const mismatch = g.expected !== undefined && g.expected !== count const selected = selectedGroupId === g.id return (
{idx > 0 &&
}
) })}

{t(lang, 'selectGroup')}

) }