diff --git a/src/features/groups/GroupsPage.tsx b/src/features/groups/GroupsPage.tsx index 676c96c..72ea4c5 100644 --- a/src/features/groups/GroupsPage.tsx +++ b/src/features/groups/GroupsPage.tsx @@ -1,9 +1,45 @@ +import { useMemo } from 'react'; import { Link } from '@tanstack/react-router'; import { Users } from 'lucide-react'; import { PageHeader } from '@/components/ui/PageHeader'; import { GroupTable } from '@/components/GroupTable'; import { useTournamentStore } from '@/stores/tournamentStore'; -import { useT } from '@/lib/i18n'; +import { groupScenarios, type TeamScenario } from '@/lib/scenarios'; +import { teamFlag } from '@/lib/teams'; +import { fmt, useT } from '@/lib/i18n'; +import type { Dict } from '@/lib/i18n'; + +function scenarioLabel(s: TeamScenario, t: Dict): { text: string; tone: string } { + if (s.guaranteed) return { text: t.groups.scThrough, tone: 'text-accent' }; + if (!s.alive) return { text: t.groups.scOut, tone: 'text-faint line-through' }; + if (s.safeWithWin) return { text: t.groups.scWin, tone: 'text-ink' }; + return { text: fmt(t.groups.scAlive, { n: s.top2Count, total: s.totalCombos }), tone: 'text-muted' }; +} + +/** Final-round qualification scenarios under a group's table (top-2 only — + * third place runs through the cross-group best-thirds race). */ +function Scenarios({ scenarios }: { scenarios: TeamScenario[] }) { + const t = useT(); + return ( +
{t.groups.scNote}
}