import type { RecordPageViewOutput } from '@core/analytics/application/use-cases/RecordPageViewUseCase';
import type { RecordPageViewOutputDTO } from '../dtos/RecordPageViewOutputDTO';

export class RecordPageViewPresenter {
  private model: RecordPageViewOutputDTO | null = null;

  transform(output: RecordPageViewOutput): RecordPageViewOutputDTO {
    this.model = {
      pageViewId: output.pageViewId,
    };
    return this.model;
  }

  get responseModel(): RecordPageViewOutputDTO {
    if (!this.model) throw new Error('Presenter not transformed');
    return this.model;
  }
}