import { ApiProperty } from "@nestjs/swagger"
import {
  IsNotEmpty,
  IsOptional,
  IsString,
  IsNumber,
  IsInt,
  IsBoolean,
} from "class-validator"

export class CreateTripIntermediateStopDto {
  @ApiProperty({
    example: 1,
    description: "ID of the stop",
  })
  @IsNumber()
  @IsOptional()
  intermediate_stop_id: number

  @ApiProperty({
    example: 1,
    description: "ID of the associated trip",
  })
  @IsNumber()
  @IsNotEmpty()
  trip_id: number

  @ApiProperty({
    example: 1,
    description: "ID of the stop",
  })
  @IsNumber()
  @IsOptional()
  hospital_id: number

  @ApiProperty({
    example: "123 Main Street, Springfield",
    description: "Address of the intermediate stop",
  })
  @IsString()
  @IsOptional()
  stop_address: string

  @ApiProperty({
    example: 30,
    description: "Duration of stop in minutes",
    required: false,
  })
  @IsOptional()
  @IsInt()
  duration?: number

  @ApiProperty({
    example: "Client requested a short break",
    description: "Additional notes about the stop",
    required: false,
  })
  @IsOptional()
  @IsString()
  notes?: string

  @ApiProperty({
    example: 30,
    description: "Duration of stop in minutes",
    required: false,
  })
  @IsOptional()
  type?: string

  @ApiProperty({
    example: "false",
    description: "Additional notes about the stop",
    required: false,
  })
  @IsOptional()
  @IsBoolean()
  should_remove?: boolean

  @ApiProperty({
    example: 30,
    description: "Duration of stop in minutes",
    required: false,
  })
  @IsOptional()
  latitude?: string

  @ApiProperty({
    example: 30,
    description: "Duration of stop in minutes",
    required: false,
  })
  @IsOptional()
  longitude?: string

  @ApiProperty({
    example: 30,
    description: "Duration of stop in minutes",
    required: false,
  })
  @IsOptional()
  estimated_time?: string

  @ApiProperty({
    example: 30,
    description: "Duration of stop in minutes",
    required: false,
  })
  @IsOptional()
  estimated_distance?: string

  @ApiProperty({
    example: "ChIJN1t_tDeuEmsRUsoyG83frY4",
    description: "Google Place ID for the stop location",
    required: false,
  })
  @IsOptional()
  place_id?: string
}
