import type { RecordEngagementOutputDTO } from '../types/generated/RecordEngagementOutputDTO';

/**
 * Record engagement output view model
 * Represents the result of recording an engagement event for UI consumption
 */
export class RecordEngagementOutputViewModel {
  eventId: string;
  engagementWeight: number;

  constructor(dto: RecordEngagementOutputDTO) {
    this.eventId = dto.eventId;
    this.engagementWeight = dto.engagementWeight;
  }

  /** UI-specific: Formatted event ID for display */
  get displayEventId(): string {
    return `Event: ${this.eventId}`;
  }

  /** UI-specific: Formatted engagement weight */
  get displayEngagementWeight(): string {
    return `${this.engagementWeight.toFixed(2)}`;
  }

  /** UI-specific: Is high engagement */
  get isHighEngagement(): boolean {
    return this.engagementWeight > 1.0;
  }
}
