import { AriaComboBoxProps } from 'react-aria/useComboBox';
import { ClassNameOrFunction, ContextValue, RACValidation, RenderProps, SlotProps } from './utils';
import { ComboBoxState } from 'react-stately/useComboBoxState';
import { GlobalDOMAttributes } from '@react-types/shared';
import React, { HTMLAttributes, ReactElement, ReactNode } from 'react';
type SelectionMode = 'single' | 'multiple';
export interface ComboBoxRenderProps {
    /**
     * Whether the combobox is currently open.
     *
     * @selector [data-open]
     */
    isOpen: boolean;
    /**
     * Whether the combobox is disabled.
     *
     * @selector [data-disabled]
     */
    isDisabled: boolean;
    /**
     * Whether the combobox is invalid.
     *
     * @selector [data-invalid]
     */
    isInvalid: boolean;
    /**
     * Whether the combobox is required.
     *
     * @selector [data-required]
     */
    isRequired: boolean;
    /**
     * Whether the combobox is read only.
     *
     * @selector [data-readonly]
     */
    isReadOnly: boolean;
}
export interface ComboBoxProps<T, M extends SelectionMode = 'single'> extends Omit<AriaComboBoxProps<T, M>, 'children' | 'placeholder' | 'label' | 'description' | 'errorMessage' | 'validationState' | 'validationBehavior'>, RACValidation, RenderProps<ComboBoxRenderProps>, SlotProps, GlobalDOMAttributes<HTMLDivElement> {
    /**
     * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the
     * element. A function may be provided to compute the class based on component state.
     *
     * @default 'react-aria-ComboBox'
     */
    className?: ClassNameOrFunction<ComboBoxRenderProps>;
    /** The filter function used to determine if a option should be included in the combo box list. */
    defaultFilter?: (textValue: string, inputValue: string) => boolean;
    /**
     * Whether the text or key of the selected item is submitted as part of an HTML form. When
     * `allowsCustomValue` is `true`, this option does not apply and the text is always submitted.
     *
     * @default 'key'
     */
    formValue?: 'text' | 'key';
    /** Whether the combo box allows the menu to be open when the collection is empty. */
    allowsEmptyCollection?: boolean;
}
export declare const ComboBoxContext: React.Context<ContextValue<ComboBoxProps<any, SelectionMode>, HTMLDivElement>>;
export declare const ComboBoxStateContext: React.Context<ComboBoxState<any, SelectionMode> | null>;
/**
 * A combo box combines a text input with a listbox, allowing users to filter a list of options to
 * items matching a query.
 */
export declare const ComboBox: <T, M extends SelectionMode = "single">(props: ComboBoxProps<T, M> & React.RefAttributes<HTMLDivElement>) => ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
export interface ComboBoxValueRenderProps<T> {
    /**
     * Whether the value is a placeholder.
     *
     * @selector [data-placeholder]
     */
    isPlaceholder: boolean;
    /** The object values of the currently selected items. */
    selectedItems: (T | null)[];
    /** The textValue of the currently selected items. */
    selectedText: string;
    /** The state of the ComboBox. */
    state: ComboBoxState<T, 'single' | 'multiple'>;
}
export interface ComboBoxValueProps<T> extends Omit<HTMLAttributes<HTMLElement>, keyof RenderProps<unknown>>, RenderProps<ComboBoxValueRenderProps<T>, 'div'> {
    /**
     * The CSS [className](https://developer.mozilla.org/en-US/docs/Web/API/Element/className) for the
     * element. A function may be provided to compute the class based on component state.
     *
     * @default 'react-aria-ComboBoxValue'
     */
    className?: ClassNameOrFunction<ComboBoxValueRenderProps<T>>;
    /** A value to display when no items are selected. */
    placeholder?: ReactNode;
}
export declare const ComboBoxValueContext: React.Context<ContextValue<ComboBoxValueProps<any>, HTMLDivElement>>;
/**
 * ComboBoxValue renders the selected values of a ComboBox, or a placeholder if no value is
 * selected. By default, the items are rendered as a comma separated list. Use the render function
 * to customize this.
 */
export declare const ComboBoxValue: <T>(props: ComboBoxValueProps<T> & React.RefAttributes<HTMLDivElement>) => ReactElement<unknown, string | React.JSXElementConstructor<any>> | null;
export {};
