/**
 * Application Port: ITeamStatsRepository
 * 
 * Repository interface for storing and retrieving computed team statistics.
 * This is used for caching computed stats and serving frontend data.
 */

export interface TeamStats {
  performanceLevel: 'beginner' | 'intermediate' | 'advanced' | 'pro';
  specialization: 'endurance' | 'sprint' | 'mixed';
  region: string;
  languages: string[];
  totalWins: number;
  totalRaces: number;
  rating: number;
  category?: string;
}

export interface ITeamStatsRepository {
  /**
   * Get stats for a specific team
   */
  getTeamStats(teamId: string): Promise<TeamStats | null>;

  /**
   * Save stats for a specific team
   */
  saveTeamStats(teamId: string, stats: TeamStats): Promise<void>;

  /**
   * Get all team stats
   */
  getAllStats(): Promise<Map<string, TeamStats>>;

  /**
   * Clear all stats
   */
  clear(): Promise<void>;
}
