/**
 * Leaderboards Repository Port
 *
 * Defines the interface for accessing leaderboards-related data.
 * This is a read-only repository for leaderboards data aggregation.
 */

/**
 * Driver data for leaderboards
 */
export interface LeaderboardDriverData {
  id: string;
  name: string;
  rating: number;
  teamId?: string;
  teamName?: string;
  raceCount: number;
}

/**
 * Team data for leaderboards
 */
export interface LeaderboardTeamData {
  id: string;
  name: string;
  rating: number;
  memberCount: number;
  raceCount: number;
}

/**
 * Leaderboards Repository Interface
 *
 * Provides access to all data needed for leaderboards.
 */
export interface LeaderboardsRepository {
  /**
   * Find all drivers for leaderboards
   * @returns Array of driver data
   */
  findAllDrivers(): Promise<LeaderboardDriverData[]>;

  /**
   * Find all teams for leaderboards
   * @returns Array of team data
   */
  findAllTeams(): Promise<LeaderboardTeamData[]>;

  /**
   * Find drivers by team ID
   * @param teamId - The team ID
   * @returns Array of driver data
   */
  findDriversByTeamId(teamId: string): Promise<LeaderboardDriverData[]>;
}
