import { z } from "zod"

import type { Hotel } from "@/types/hotel"

export const cancelStaySchema = z.object({
  rooms: z.array(
    z.object({
      checked: z.boolean(),
      refId: z.string(),
    })
  ),
})

export interface CancelStayProps {
  handleCloseModal: () => void
  hotel: Hotel
}

export type CancelStayFormValues = z.output<typeof cancelStaySchema>

export interface RoomDetails {
  id: string
  roomName: string
  roomTypeCode: string
  rateDefinition: {
    breakfastIncluded: boolean
    cancellationRule: string | null
    cancellationText: string | null
    generalTerms: string[]
    isMemberRate: boolean
    mustBeGuaranteed: boolean
    rateCode: string
    title: string | null
  }
  isMainBooking?: boolean
}

export interface StayDetails {
  checkInDate: string
  checkOutDate: string
  nightsText: string
  adultsText: string
  childrenText: string
}
