import type { LexicsId, Values } from 'features/LexicsStore/types'
import type { Match as MatchBase } from 'features/Matches/hooks'
import type { SubscriptionResponse } from 'requests'

export enum Steps {
  CardSelection = 'CardSelection',
  Error = 'Error',
  SelectSubscription = 'SelectSubscription',
  Subscriptions = 'Subscriptions',
  Success = 'Success',
}

export enum SubscriptionType {
  Month = 'month',
  PayPerView = 'pay_per_view',
  Year = 'year',
}

type Desciption = {
  lexic: LexicsId,
  values: Values,
}

export type MatchSubscription = {
  currency: string,
  description: Desciption,
  id: string,
  name: string,
  originalObject: SubscriptionResponse,
  pass: string,
  price: number,
  seasonName?: string,
  type: SubscriptionType,
}

export type Match = Pick<MatchBase, (
  'id'
  | 'sportType'
  | 'team1'
  | 'team2'
  | 'tournament'
  | 'calc'
  | 'hasVideo'
)>

export type MatchSubscriptions = Record<SubscriptionType, Array<MatchSubscription>>
