import React from "react"; import { BookingForm, FormStateItem } from "./use-react-booking-form"; export declare type OptionType = { name: string; value: any; }; /** * Popup window position offset */ export declare type OffsetType = [number, number]; export declare type GuestSelectType = { form: BookingForm; name: string; menu: React.ElementType; menuContainer: React.ElementType; option: React.ElementType; okButton?: React.ElementType; okText?: string; inputComponent: React.ElementType; placeholder?: string; /** * Popup window position offset */ offset?: OffsetType; /** * The format of text to be displayed in the input component. * - "all" would show the text 1 guest, 2 guests, ... * - "each" would show `1 adults`, `2 adults | 2 children`, ... */ countTextFormat?: CountTextFormat; /** * This is a hack: when the selector is used in Gatsby inside of a @headlessui/react Dialog * then if Portal isn't passed externally and used here from @headlessui/react * then it would create a bug where the Dialog would close whenever user clicks on the Option * and not select anything. This prop allows to ensure intended behavior. */ portal?: React.ElementType; }; declare type CountTextFormat = "all" | "each" | ((fieldItem?: FormStateItem) => string); export declare const GuestSelect: ({ form, name, menu: Menu, option: OptionComponent, menuContainer: MenuContainer, inputComponent: InputComponent, okButton: OkButton, okText, placeholder, offset, countTextFormat, portal: PortalInput, }: GuestSelectType) => JSX.Element; export {};