import { ApiProperty } from '@nestjs/swagger';

/**
 * Response DTO for seat availability check
 */
export class SeatAvailabilityResponseDto {
  @ApiProperty({ description: 'Program ID', example: 1 })
  programId: number;

  @ApiProperty({ description: 'Session ID (if session-level registration)', example: 10, required: false })
  sessionId?: number;

  @ApiProperty({ description: 'Registration level', example: 'program' })
  registrationLevel: string;

  // Core capacity information
  @ApiProperty({ description: 'Whether seats are limited', example: true })
  limitedSeats: boolean;

  @ApiProperty({ description: 'Total available seats', example: 100 })
  totalSeats: number;

  @ApiProperty({ description: 'Currently filled seats', example: 95 })
  filledSeats: number;

  @ApiProperty({ description: 'Remaining seats', example: 5 })
  seatsRemaining: number;

  // Waitlist configuration
  @ApiProperty({ description: 'Whether waitlist is applicable', example: true })
  waitlistApplicable: boolean;

  @ApiProperty({ description: 'Seat count threshold to trigger waitlist', example: 10 })
  waitlistTriggerCount: number;

  // Status flags
  @ApiProperty({ description: 'Whether waitlist has been triggered', example: false })
  isWaitlistTriggered: boolean;

  @ApiProperty({ description: 'Whether registrations have exceeded capacity (when no waitlist)', example: false })
  isRegistrationsExceeded: boolean;

  // Decision outcomes
  @ApiProperty({ description: 'Whether new registration can be made', example: true })
  canRegister: boolean;

  @ApiProperty({ description: 'Whether new registration should be waitlisted', example: false })
  shouldWaitlist: boolean;

  @ApiProperty({ description: 'Whether registration should be rejected (exceeded without waitlist)', example: false })
  shouldReject: boolean;

  // Status information
  @ApiProperty({ description: 'Human-readable status message', example: 'Normal registration allowed' })
  statusMessage: string;

  @ApiProperty({ 
    description: 'Capacity status classification', 
    enum: ['NORMAL', 'WAITLIST', 'EXCEEDED', 'UNLIMITED'],
    example: 'NORMAL' 
  })
  capacityStatus: string;
}
