// frontend/src/types.ts

export interface MatchData {
    id: string | number;
    number: number;
    round: number;
    bracket: string;
    time: string;
    court: string;
    status: string;
    hasTeams: boolean;
    isReady: boolean;
    isFinished: boolean;
    p1: string;
    p2: string;
    p1_sets: number;
    p2_sets: number;
    p1_is_real: boolean;
    p2_is_real: boolean;
    winnerName: string | null;

    bracket_type?: string;
    round_number?: number;
    match_number?: number;
    court_id?: string | number;

    winner_team_id?: string | number | null;
    p1_team_id?: string | number | null;
    p2_team_id?: string | number | null;
    winner_next_match_id?: string | number | null;
    loser_next_match_id?: string | number | null;
    timestamp?: string;
    start_time?: string;
    ref_label?: string;
    ref_team?: { id: string | number; name: string };
}

export interface SetData {
    p1: number | string;
    p2: number | string;
}