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

export class UpdatePublicSiteDto {
  @ApiProperty({
    description: 'Enable public site',
    example: true,
    required: false,
  })
  @IsBoolean()
  @IsOptional()
  site_enabled?: boolean;

  @ApiProperty({
    description: 'Show server on status page',
    example: true,
    required: false,
  })
  @IsBoolean()
  @IsOptional()
  show_on_status_page?: boolean;

  @ApiProperty({
    description: 'Steam connect URL',
    example: 'steam://connect/123.456.789.0:28015',
    required: false,
  })
  @IsString()
  @IsOptional()
  steam_connect_url?: string;

  @ApiProperty({
    description: 'Message of the day',
    example: 'Welcome to our server!',
    required: false,
  })
  @IsString()
  @IsOptional()
  motd?: string;

  @ApiProperty({
    description: 'Public mods list',
    example: ['Plugin1', 'Plugin2'],
    required: false,
  })
  @IsOptional()
  public_mods?: string[];

  @ApiProperty({
    description: 'Header image URL',
    example: 'https://example.com/header.jpg',
    required: false,
  })
  @IsUrl()
  @IsString()
  @IsOptional()
  header_image_url?: string;

  @ApiProperty({
    description: 'Theme color (hex)',
    example: '#1a1a1a',
    required: false,
  })
  @IsString()
  @IsOptional()
  theme_color?: string;

  @ApiProperty({
    description: 'Discord invite URL',
    example: 'https://discord.gg/xxxxx',
    required: false,
  })
  @IsUrl()
  @IsString()
  @IsOptional()
  discord_invite_url?: string;

  @ApiProperty({
    description: 'Show player count on public site',
    example: true,
    required: false,
  })
  @IsBoolean()
  @IsOptional()
  show_player_count?: boolean;

  @ApiProperty({
    description: 'Show wipe schedule on public site',
    example: true,
    required: false,
  })
  @IsBoolean()
  @IsOptional()
  show_wipe_schedule?: boolean;

  @ApiProperty({
    description: 'Show wipe countdown on public site',
    example: true,
    required: false,
  })
  @IsBoolean()
  @IsOptional()
  show_wipe_countdown?: boolean;

  @ApiProperty({
    description: 'Show mod list on public site',
    example: true,
    required: false,
  })
  @IsBoolean()
  @IsOptional()
  show_mod_list?: boolean;

  @ApiProperty({
    description: 'Status page description',
    example: 'A friendly Rust server for all skill levels',
    required: false,
  })
  @IsString()
  @IsOptional()
  status_page_description?: string;
}
