import { ApiProperty } from '@nestjs/swagger';
import { IsBoolean, IsInt, IsObject, IsOptional, IsString, MaxLength } from 'class-validator';

export class UpdateTemplateFormSectionDto {
  @ApiProperty({ description: 'Section key', required: false })
  @IsOptional()
  @IsString()
  @MaxLength(100)
  sectionKey?: string;

  @ApiProperty({ description: 'Section name', required: false })
  @IsOptional()
  @IsString()
  @MaxLength(255)
  name?: string;

  @ApiProperty({ description: 'Section description', required: false })
  @IsOptional()
  @IsString()
  description?: string;

  @ApiProperty({ description: 'Parent section ID', required: false })
  @IsOptional()
  @IsInt()
  parentSectionId?: number;

  @ApiProperty({ description: 'Conditional display configuration', required: false })
  @IsOptional()
  @IsObject()
  conditionalConfig?: Record<string, any>;

  @ApiProperty({ description: 'Display order', required: false })
  @IsOptional()
  @IsInt()
  displayOrder?: number;

  @ApiProperty({ description: 'User ID who updated this section', required: false })
  @IsOptional()
  @IsInt()
  updatedBy?: number;
}
