import { IsString, IsInt, IsOptional, IsPositive } from 'class-validator';
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';

export class LogExcessBaggageDto {
  @ApiProperty({ example: 'booking-uuid' }) @IsString() bookingId: string;
  @ApiPropertyOptional({ example: 'agent-uuid', description: 'Injected from IAM token; optional override' })
  @IsOptional() @IsString() agentId?: string;
  @ApiProperty({ example: 7, description: 'Excess weight in kg above the free allowance' })
  @IsInt() @IsPositive() excessWeightKg: number;
  @ApiPropertyOptional({ description: 'Collect cash now instead of sending a payment link' })
  @IsOptional() collectCash?: boolean;
}

export class WaiveChargeDto {
  @ApiProperty() @IsString() waivedBy: string;
  @ApiPropertyOptional() @IsOptional() @IsString() waivedReason?: string;
}

export class InitiateExcessPaymentDto {
  @ApiProperty({ enum: ['TELEBIRR', 'CBE_BIRR', 'EBIRR', 'WAAFI', 'DMONEY', 'CARD'] })
  @IsString() method: string;
  @ApiPropertyOptional({ enum: ['web', 'mobile'] }) @IsOptional() platform?: string;
}
