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

export class UpdateStoreConfigDto {
  @ApiPropertyOptional({ description: 'Store display name' })
  @IsOptional()
  @IsString()
  @Length(1, 200)
  store_name?: string;

  @ApiPropertyOptional({ description: 'Store description' })
  @IsOptional()
  @IsString()
  description?: string;

  @ApiPropertyOptional({ description: 'Currency code (e.g., USD)' })
  @IsOptional()
  @IsString()
  @Length(3, 3)
  currency?: string;

  @ApiPropertyOptional({ description: 'PayPal client ID' })
  @IsOptional()
  @IsString()
  paypal_client_id?: string;

  @ApiPropertyOptional({ description: 'PayPal client secret' })
  @IsOptional()
  @IsString()
  paypal_client_secret?: string;

  @ApiPropertyOptional({ description: 'Use PayPal sandbox mode' })
  @IsOptional()
  @IsBoolean()
  sandbox_mode?: boolean;

  @ApiPropertyOptional({ description: 'Enable the webstore' })
  @IsOptional()
  @IsBoolean()
  enabled?: boolean;
}
