import { VariantProps } from "class-variance-authority"
import { z } from "zod"

import { bookingWidgetSchema } from "@/components/Forms/BookingWidget/schema"
import { bookingWidgetVariants } from "@/components/Forms/BookingWidget/variants"

import { GuestsRoom } from "./guestsRoomsPicker"

import type { Locations } from "@/types/trpc/routers/hotel/locations"

export type BookingWidgetSchema = z.output<typeof bookingWidgetSchema>

export type BookingWidgetSearchParams = {
  city?: string
  hotel?: string
  fromDate?: string
  toDate?: string
  room?: GuestsRoom[]
}

export type BookingWidgetType = VariantProps<
  typeof bookingWidgetVariants
>["type"]

export interface BookingWidgetProps {
  type?: BookingWidgetType
  searchParams?: URLSearchParams
}

export interface BookingWidgetClientProps {
  locations: Locations
  type?: BookingWidgetType
  searchParams?: URLSearchParams
}

export interface BookingWidgetToggleButtonProps {
  openMobileSearch: () => void
}
