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

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;
  }
}
