import { z } from "zod"

import { Lang } from "@/constants/languages"

export const changeDatesSchema = z.object({
  checkInDate: z.string(),
  checkOutDate: z.string(),
})

export type ChangeDatesSchema = z.output<typeof changeDatesSchema>

export interface QueryInput {
  hotelId: string
  roomStayStartDate: string
  roomStayEndDate: string
  adults: number
  children: string
  bookingCode: string
  rateCode: string
  roomTypeCode: string
  lang: Lang
}

export const DEFAULT_QUERY_INPUT: QueryInput = {
  hotelId: "",
  roomStayStartDate: "",
  roomStayEndDate: "",
  adults: 1,
  children: "",
  bookingCode: "",
  rateCode: "",
  roomTypeCode: "",
  lang: Lang.en,
}

export interface ChangeDatesStepsProps {
  closeModal: () => void
}

export interface ChangeDatesFormProps {
  checkAvailability: (fromDate: string, toDate: string) => Promise<void>
  closeModal: () => void
  noAvailability: boolean
}
