import { IsBoolean, IsIn, IsOptional, IsString } from 'class-validator';

const MODES = ['MANUAL', 'AUTOMATIC', 'HYBRID', 'SIMULATION_ONLY'] as const;
const FORMATS = ['FORWARD', 'THREADED', 'DIGEST', 'SUMMARY', 'TRANSCRIPT'] as const;

export class CreateBindingDto {
  @IsString() originChannelType!: string;
  @IsOptional() @IsString() originRef?: string;
  @IsString() destinationChannelType!: string;
  @IsOptional() @IsString() destinationRef?: string;
  @IsOptional() @IsString() restrictionProfile?: string;
  @IsOptional() @IsIn(MODES) mode?: (typeof MODES)[number];
  @IsOptional() @IsIn(FORMATS) outputFormat?: (typeof FORMATS)[number];
  @IsOptional() @IsString() frequency?: string;
  @IsOptional() @IsBoolean() includeAttachments?: boolean;
  @IsOptional() @IsBoolean() requiresReview?: boolean;
  @IsOptional() @IsBoolean() enabled?: boolean;
}

export class SimulateDto {
  @IsString() interactionId!: string;
  @IsString() originChannelType!: string;
  @IsOptional() @IsString() originRef?: string;
}
