import {
  IsString,
  IsEmail,
  IsBoolean,
  IsEnum,
  IsOptional,
  IsHexColor,
  MaxLength,
} from 'class-validator';
import { PageSize } from '@prisma/client';

export class UpdatePdfSettingsDto {
  // Branding
  @IsOptional()
  @IsString()
  @MaxLength(100)
  organizationName?: string;

  @IsOptional()
  @IsHexColor()
  accentColor?: string;

  @IsOptional()
  @IsString()
  @MaxLength(200)
  tagline?: string;

  // Contact Info
  @IsOptional()
  @IsEmail()
  contactEmail?: string;

  @IsOptional()
  @IsString()
  @MaxLength(50)
  contactPhone?: string;

  @IsOptional()
  @IsString()
  @MaxLength(100)
  secondaryContactName?: string;

  @IsOptional()
  @IsString()
  @MaxLength(50)
  secondaryContactPhone?: string;

  @IsOptional()
  @IsString()
  @MaxLength(100)
  contactLabel?: string;

  // Document Options
  @IsOptional()
  @IsBoolean()
  showDraftWatermark?: boolean;

  @IsOptional()
  @IsBoolean()
  showConfidentialWatermark?: boolean;

  @IsOptional()
  @IsBoolean()
  showTimestamp?: boolean;

  @IsOptional()
  @IsBoolean()
  showAppUrl?: boolean;

  @IsOptional()
  @IsEnum(PageSize)
  pageSize?: PageSize;

  // Timezone (IANA format, e.g., "America/New_York")
  @IsOptional()
  @IsString()
  @MaxLength(50)
  timezone?: string;

  // Content Toggles
  @IsOptional()
  @IsBoolean()
  showFlightInfo?: boolean;

  @IsOptional()
  @IsBoolean()
  showDriverNames?: boolean;

  @IsOptional()
  @IsBoolean()
  showVehicleNames?: boolean;

  @IsOptional()
  @IsBoolean()
  showVipNotes?: boolean;

  @IsOptional()
  @IsBoolean()
  showEventDescriptions?: boolean;

  // Custom Text
  @IsOptional()
  @IsString()
  @MaxLength(500)
  headerMessage?: string;

  @IsOptional()
  @IsString()
  @MaxLength(500)
  footerMessage?: string;
}
