import { GetLeagueStandingsUseCase, LeagueStandingsViewModel } from '@gridpilot/core/league/application/use-cases/GetLeagueStandingsUseCase'; export interface ILeagueStandingsPresenter { present(leagueId: string): Promise; getViewModel(): LeagueStandingsViewModel | null; reset(): void; } export class LeagueStandingsPresenter implements ILeagueStandingsPresenter { private viewModel: LeagueStandingsViewModel | null = null; constructor(private getLeagueStandingsUseCase: GetLeagueStandingsUseCase) {} reset(): void { this.viewModel = null; } async present(leagueId: string): Promise { this.viewModel = await this.getLeagueStandingsUseCase.execute(leagueId); } getViewModel(): LeagueStandingsViewModel | null { return this.viewModel; } }