import { IsObject, IsBoolean, IsOptional } from 'class-validator';
import { ApiPropertyOptional } from '@nestjs/swagger';

export class UpdatePluginConfigDto {
  @ApiPropertyOptional({ example: { enabled: true, max_kits: 5 } })
  @IsOptional()
  @IsObject()
  config_json?: Record<string, any>;

  @ApiPropertyOptional({ example: false, description: 'Wipe plugin data on map wipe' })
  @IsOptional()
  @IsBoolean()
  wipe_on_map?: boolean;

  @ApiPropertyOptional({ example: false, description: 'Wipe plugin data on blueprint wipe' })
  @IsOptional()
  @IsBoolean()
  wipe_on_bp?: boolean;

  @ApiPropertyOptional({ example: true, description: 'Wipe plugin data on full wipe' })
  @IsOptional()
  @IsBoolean()
  wipe_on_full?: boolean;

  @ApiPropertyOptional({ example: false, description: 'Never wipe this plugin data' })
  @IsOptional()
  @IsBoolean()
  never_wipe?: boolean;
}
