import { SportTypes } from 'config'

type Tournament = {
  id: number,
  name_eng: string,
  name_rus: string,
}

type Team = {
  id: number,
  name_eng: string,
  name_rus: string,
  score?: number,
}

export type Match = {
  access: boolean,
  calc: boolean,
  country_id: number,
  date: string,
  /** наличие mp4 видео */
  has_video: boolean,
  id: number,
  /** наличие hls стрима */
  live: boolean,
  preview?: string,
  sport: SportTypes,
  /** наличие завершенного hls стрима */
  storage: boolean,
  sub: boolean,
  team1: Team,
  team2: Team,
  tournament: Tournament,
}

export type Matches = Array<Match>

type VideoContent = {
  broadcast: Matches,
  features: Matches,
  highlights: Matches,
}

export type MatchesResponse = {
  is_video_sections: boolean | null,
  show: boolean,
  video_content: VideoContent,
}

export type MatchesBySection = {
  broadcast: Matches,
  features: Matches,
  hasNextPage: boolean,
  highlights: Matches,
  isVideoSections: boolean,
}
