import { PlayerInfo } from "@/features/players/types";
import { TeamInfo } from "@/features/teams/types";

export type PicksMap = Record<string, string>;

export interface Prediction {
  id: string;
  tournament: string;
  player: PlayerInfo;
  picks: PicksMap;
  created: string;
  updated: string;
}

export interface PredictionLeaderboardEntry {
  player: PlayerInfo;
  points: number;
  correct: number;
  total: number;
  championPick?: TeamInfo;
  championCorrect: boolean;
  updated: string;
}

export interface PredictionsLeaderboard {
  locked: boolean;
  count: number;
  entries: PredictionLeaderboardEntry[];
  submitters: PlayerInfo[];
}

export interface MyPrediction {
  prediction: Prediction | null;
  locked: boolean;
  eligible: boolean;
}
