import { IsString, IsEnum, IsOptional, ValidateNested, IsDateString, IsObject } from 'class-validator';
import { Type } from 'class-transformer';
import { KYCType } from '@livebeauty/shared';

class AddressDto {
  @IsString()
  street: string;

  @IsString()
  city: string;

  @IsString()
  state: string;

  @IsString()
  postalCode: string;

  @IsString()
  country: string;
}

export class SubmitKYCDto {
  @IsEnum(KYCType)
  type: KYCType;

  @IsString()
  fullName: string;

  @IsDateString()
  dateOfBirth: string;

  @IsString()
  nationality: string;

  @IsString()
  idNumber: string;

  @IsString()
  idType: string;

  @ValidateNested()
  @Type(() => AddressDto)
  address: AddressDto;

  @IsString()
  phoneNumber: string;

  @IsString()
  @IsOptional()
  email?: string;
}