import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import { IsEnum, IsOptional, IsString } from 'class-validator';
import { type HeatmapLevel } from '../../application/queries/get-heatmap/get-heatmap.query';

export class GetHeatmapDto {
  @ApiProperty({ description: 'City name' })
  @IsString()
  city!: string;

  @ApiProperty({ description: 'Time period (e.g. "2026-Q1" or "2026-03")' })
  @IsString()
  period!: string;

  @ApiPropertyOptional({
    description: 'Zoom level: "district" (default) or "ward" for drill-down',
    enum: ['district', 'ward'],
    default: 'district',
  })
  @IsEnum(['district', 'ward'])
  @IsOptional()
  level?: HeatmapLevel;

  @ApiPropertyOptional({
    description: 'Filter by district when level=ward (optional)',
  })
  @IsString()
  @IsOptional()
  district?: string;
}
