/**
 * Record engagement input view model
 * Represents input data for recording an engagement event
 *
 * Note: No matching generated DTO available yet
 */
export class RecordEngagementInputViewModel {
  eventType: string;
  userId?: string;
  metadata?: Record<string, unknown>;

  constructor(data: { eventType: string; userId?: string; metadata?: Record<string, unknown> }) {
    this.eventType = data.eventType;
    this.userId = data.userId;
    this.metadata = data.metadata;
  }

  /** UI-specific: Formatted event type for display */
  get displayEventType(): string {
    return this.eventType.replace(/_/g, ' ').replace(/\b\w/g, l => l.toUpperCase());
  }

  /** UI-specific: Has metadata */
  get hasMetadata(): boolean {
    return this.metadata !== undefined && Object.keys(this.metadata).length > 0;
  }

  /** UI-specific: Metadata keys count */
  get metadataKeysCount(): number {
    return this.metadata ? Object.keys(this.metadata).length : 0;
  }
}