/**
 * LeagueStandingsViewData - Pure ViewData for LeagueStandingsTemplate
 * Contains only raw serializable data, no methods or computed properties
 */

export interface StandingEntryData {
  driverId: string;
  position: number;
  totalPoints: number;
  racesFinished: number;
  racesStarted: number;
  avgFinish: number | null;
  penaltyPoints: number;
  bonusPoints: number;
  teamName?: string;
  // New fields from Phase 3
  positionChange: number;
  lastRacePoints: number;
  droppedRaceIds: string[];
  wins: number;
  podiums: number;
}

export interface DriverData {
  id: string;
  name: string;
  avatarUrl: string | null;
  iracingId?: string;
  rating?: number;
  country?: string;
}

export interface LeagueMembershipData {
  driverId: string;
  leagueId: string;
  role: 'owner' | 'admin' | 'steward' | 'member';
  joinedAt: string;
  status: 'active' | 'pending' | 'banned';
}

export interface LeagueStandingsViewData {
  standings: StandingEntryData[];
  drivers: DriverData[];
  memberships: LeagueMembershipData[];
  leagueId: string;
  currentDriverId: string | null;
  isAdmin: boolean;
  // New fields for team standings toggle
  isTeamChampionship?: boolean;
}