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

export class UpdateAlertConfigDto {
  @ApiPropertyOptional({ description: 'Enable population drop alerts' })
  @IsOptional()
  @IsBoolean()
  population_drop_enabled?: boolean;

  @ApiPropertyOptional({ description: 'Population drop threshold percentage' })
  @IsOptional()
  @IsInt()
  @Min(1)
  @Max(100)
  population_drop_threshold_percent?: number;

  @ApiPropertyOptional({ description: 'Enable FPS degradation alerts' })
  @IsOptional()
  @IsBoolean()
  fps_degradation_enabled?: boolean;

  @ApiPropertyOptional({ description: 'FPS threshold for alerts' })
  @IsOptional()
  @IsInt()
  @Min(1)
  fps_threshold?: number;

  @ApiPropertyOptional({ description: 'Send alerts to Discord' })
  @IsOptional()
  @IsBoolean()
  notify_discord?: boolean;

  @ApiPropertyOptional({ description: 'Send alerts to Pushbullet' })
  @IsOptional()
  @IsBoolean()
  notify_pushbullet?: boolean;

  @ApiPropertyOptional({ description: 'Send alerts via email' })
  @IsOptional()
  @IsBoolean()
  notify_email?: boolean;
}
