import type { Presenter } from '../../../shared/presentation/Presenter';
import { DeletePrizeResultDTO } from '../dtos/DeletePrizeDTO';

export class DeletePrizePresenter implements Presenter<DeletePrizeResultDTO, DeletePrizeResultDTO> {
  private result: DeletePrizeResultDTO | null = null;

  reset() {
    this.result = null;
  }

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

  getResponseModel(): DeletePrizeResultDTO | null {
    return this.result;
  }

  get viewModel(): DeletePrizeResultDTO {
    if (!this.result) throw new Error('Presenter not presented');
    return this.result;
  }
}