import { IRemoveLeagueMemberPresenter, RemoveLeagueMemberResultDTO, RemoveLeagueMemberViewModel } from '@core/racing/application/presenters/IRemoveLeagueMemberPresenter';

export class RemoveLeagueMemberPresenter implements IRemoveLeagueMemberPresenter {
  private result: RemoveLeagueMemberViewModel | null = null;

  reset() {
    this.result = null;
  }

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

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