'use client'; import StandingsTable from '@/components/leagues/StandingsTable'; import LeagueChampionshipStats from '@/components/leagues/LeagueChampionshipStats'; import Card from '@/components/ui/Card'; import type { LeagueMembership } from '@/lib/types/LeagueMembership'; import type { DriverViewModel } from '@/lib/view-models/DriverViewModel'; import type { StandingEntryViewModel } from '@/lib/view-models/StandingEntryViewModel'; // ============================================================================ // TYPES // ============================================================================ interface LeagueStandingsTemplateProps { standings: StandingEntryViewModel[]; drivers: DriverViewModel[]; memberships: LeagueMembership[]; leagueId: string; currentDriverId: string | null; isAdmin: boolean; onRemoveMember: (driverId: string) => void; onUpdateRole: (driverId: string, newRole: string) => void; loading?: boolean; } // ============================================================================ // MAIN TEMPLATE COMPONENT // ============================================================================ export function LeagueStandingsTemplate({ standings, drivers, memberships, leagueId, currentDriverId, isAdmin, onRemoveMember, onUpdateRole, loading = false, }: LeagueStandingsTemplateProps) { if (loading) { return (