import type { RejectLeagueJoinRequestResult } from '@core/racing/application/use-cases/RejectLeagueJoinRequestUseCase';
import type { UseCaseOutputPort } from '@core/shared/application/UseCaseOutputPort';
import type { RejectJoinRequestOutputDTO } from '../dtos/RejectJoinRequestOutputDTO';

export class RejectLeagueJoinRequestPresenter implements UseCaseOutputPort<RejectLeagueJoinRequestResult> {
  private result: RejectJoinRequestOutputDTO | null = null;

  reset() {
    this.result = null;
  }

  present(result: RejectLeagueJoinRequestResult): void {
    this.result = {
      success: result.success,
      message: result.message,
    };
  }

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