import { LeagueDetailDTO } from '../dtos/LeagueDetailDTO';
import { SponsorRaceDTO } from '../dtos/RaceDTO';
import { SponsorDriverDTO } from '../dtos/SponsorDriverDTO';

export interface LeagueDetailViewModel {
  league: LeagueDetailDTO;
  drivers: SponsorDriverDTO[];
  races: SponsorRaceDTO[];
}

export class LeagueDetailPresenter {
  private result: LeagueDetailViewModel | null = null;

  reset() {
    this.result = null;
  }

  present(viewModel: LeagueDetailViewModel) {
    this.result = viewModel;
  }

  getViewModel(): LeagueDetailViewModel | null {
    return this.result;
  }

  get viewModel(): LeagueDetailViewModel | null {
    return this.result;
  }
}
