import { IRejectLeagueJoinRequestPresenter, RejectLeagueJoinRequestResultDTO, RejectLeagueJoinRequestViewModel } from '@core/racing/application/presenters/IRejectLeagueJoinRequestPresenter';

export class RejectLeagueJoinRequestPresenter implements IRejectLeagueJoinRequestPresenter {
  private result: RejectLeagueJoinRequestViewModel | null = null;

  reset() {
    this.result = null;
  }

  present(dto: RejectLeagueJoinRequestResultDTO) {
    this.result = dto;
  }

  getViewModel(): RejectLeagueJoinRequestViewModel {
    if (!this.result) throw new Error('Presenter not presented');
    return this.result;
  }
}