import { LeagueCardViewModel } from './LeagueCardViewModel';
import { TeamCardViewModel } from './TeamCardViewModel';
import { UpcomingRaceCardViewModel } from './UpcomingRaceCardViewModel';

interface HomeDiscoveryDTO {
  topLeagues: LeagueCardViewModel[];
  teams: TeamCardViewModel[];
  upcomingRaces: UpcomingRaceCardViewModel[];
}

/**
 * Home discovery view model
 * Aggregates discovery data for the landing page.
 */
export class HomeDiscoveryViewModel {
  readonly topLeagues: LeagueCardViewModel[];
  readonly teams: TeamCardViewModel[];
  readonly upcomingRaces: UpcomingRaceCardViewModel[];

  constructor(dto: HomeDiscoveryDTO) {
    this.topLeagues = dto.topLeagues;
    this.teams = dto.teams;
    this.upcomingRaces = dto.upcomingRaces;
  }
}
