import { teamFlag } from '@/lib/teams';
import { cn } from '@/lib/cn';
import type { TeamSlot } from '@/lib/types';
/** A team identity (flag + name) or, for an unresolved knockout slot, a muted
* placeholder label ("Runner-up Group A"). */
export function TeamLabel({
slot,
align = 'left',
className,
}: {
slot: TeamSlot;
align?: 'left' | 'right';
className?: string;
}) {
const right = align === 'right';
if (!slot.team) {
return (
{slot.label}
);
}
return (
{teamFlag(slot.team)}
{slot.team}
);
}