import { z } from "zod"

import {
  priceSchema,
  Product,
  productTypePriceSchema,
  RoomConfiguration,
} from "@/server/routers/hotels/output"

import { RoomPackage } from "./roomFilter"
import { Rate } from "./selectRate"

type ProductPrice = z.output<typeof productTypePriceSchema>
export type RoomPriceSchema = z.output<typeof priceSchema>

export type FlexibilityOptionProps = {
  product: Product | undefined
  name: string
  value: string
  paymentTerm: string
  priceInformation?: Array<string>
  roomType: RoomConfiguration["roomType"]
  roomTypeCode: RoomConfiguration["roomTypeCode"]
  features: RoomConfiguration["features"]
  petRoomPackage: RoomPackage | undefined
  handleSelectRate: (rate: Rate) => void
}

export interface PriceListProps {
  publicPrice?: ProductPrice | Record<string, never>
  memberPrice?: ProductPrice | Record<string, never>
  petRoomPackage?: RoomPackage | undefined
}
