/**
 * RIE Strategy: Soccer (EPL, La Liga, Bundesliga, Serie A, Ligue 1, Champions League)
 *
 * PIFF props + Corner Scout + DVP + Grok + RAG.
 * Poisson goal models and corner analysis from RAG knowledge base.
 */

import { BaseStrategy } from './base.strategy';
import { StrategyProfile } from '../types';

const SOCCER_LEAGUES = ['epl', 'la_liga', 'bundesliga', 'serie_a', 'ligue_1', 'champions_league'];

export class SoccerStrategy extends BaseStrategy {
  league = 'soccer';

  getProfile(): StrategyProfile {
    return {
      league: this.league,
      signalWeights: {
        grok: 0.30,
        piff: 0.30,
        corner_scout: 0.15,
        dvp: 0.10,
        rag: 0.15,
      },
      requiredSignals: ['grok'],
      optionalSignals: ['piff', 'corner_scout', 'dvp', 'rag'],
      ragQueries: [
        'football expected goals poisson distribution match prediction',
        'soccer corner kicks set pieces analysis prediction model',
      ],
    };
  }
}

/**
 * Factory: create the right soccer strategy for any soccer league.
 * They all use the same weights but track their actual league name.
 */
export function createSoccerStrategy(league: string): SoccerStrategy {
  const s = new SoccerStrategy();
  s.league = league;
  return s;
}

export function isSoccerLeague(league: string): boolean {
  return SOCCER_LEAGUES.includes(league.toLowerCase());
}
