import { ApiProperty } from '@nestjs/swagger';
import { IsString, MinLength } from 'class-validator';

export class SaveSignatureDto {
  @ApiProperty()
  @IsString()
  @MinLength(1)
  signerDisplayName!: string;

  @ApiProperty({
    description: 'PNG signature image as base64 (with or without data URL prefix)',
  })
  @IsString()
  @MinLength(20)
  signatureImageBase64!: string;
}

export class SavedSignatureDto {
  @ApiProperty()
  signerDisplayName!: string;

  @ApiProperty({ nullable: true })
  signatureImageUrl!: string | null;
}
