/**
 * Smart Coupon DTOs aligned with AI Engine V20+ contract.
 */

export type CouponStrategy =
  | "SAFE"
  | "BALANCED"
  | "AGGRESSIVE"
  | "VALUE"
  | "MIRACLE";

export type RiskLevel = "LOW" | "MEDIUM" | "HIGH" | "EXTREME";
export type DataQualityLabel = "HIGH" | "MEDIUM" | "LOW";

export interface SmartCouponRequestDto {
  match_ids: string[];
  strategy?: CouponStrategy;
  max_matches?: number;
  min_confidence?: number;
}

export interface CouponBetDto {
  match_id: string;
  match_name: string;
  market: string;
  pick: string;
  probability: number;
  confidence: number;
  odds: number;
  risk_level: RiskLevel;
  data_quality: DataQualityLabel;
}

export interface RejectedMatchDto {
  match_id: string;
  reason: string;
  threshold?: number;
}

export interface SmartCouponResponseDto {
  strategy: CouponStrategy;
  generated_at: string;
  match_count: number;
  bets: CouponBetDto[];
  total_odds: number;
  expected_win_rate: number;
  rejected_matches: RejectedMatchDto[];
}

export interface SmartCouponApiError {
  error: string;
  detail?: string;
  match_ids_failed?: string[];
}

export interface StrategyInfo {
  name: CouponStrategy;
  description: string;
  typical_odds: string;
}

export interface StrategiesResponseDto {
  strategies: StrategyInfo[];
}
