import { IGetTotalLeaguesPresenter, GetTotalLeaguesResultDTO, GetTotalLeaguesViewModel } from '@core/racing/application/presenters/IGetTotalLeaguesPresenter';
import { LeagueStatsDTO } from '../dtos/LeagueStatsDTO';

export class TotalLeaguesPresenter implements IGetTotalLeaguesPresenter {
  private result: LeagueStatsDto | null = null;

  reset() {
    this.result = null;
  }

  present(dto: GetTotalLeaguesResultDTO) {
    this.result = {
      totalLeagues: dto.totalLeagues,
    };
  }

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