import React, { Key } from "react";
import { Node } from "@react-types/shared";
import { SelectState } from "@react-stately/select";
import { ComboBoxState } from "@react-stately/combobox";
/**
 * A ListBox is an abstraction over components that render a list of options that are individually selectable.
 *
 * Currently, `Select` & `ComboBox` are `ListBox`es
 */
/** Value for a single Option inside this Select */
export declare type ListBoxOption<OptionKey extends Key> = {
    /** A string that uniquely identifies this option */
    key: OptionKey;
    /** The main text to display within this option */
    title: string;
    /** An icon to show before the title */
    leadingIcon?: string;
    /** An icon to show after the title */
    trailingIcon?: string;
    /** An image to show before the title */
    leadingImageSrc?: string;
    /** The secondary text to display within this option */
    description?: string;
};
declare type ListBoxOverlayProps<OptionKey extends Key> = {
    /** An HTML ID attribute that will be attached to the the rendered component. Useful for targeting it from tests */
    id?: string;
    /** A string describing what this ListBox represents */
    label: string;
    /** Ref of the ListBox container. This is used to position the overlay */
    containerRef: React.RefObject<HTMLElement>;
    /** A ref object that will be attached to the Options container */
    listBoxRef?: React.RefObject<HTMLUListElement>;
    /** A ref object that will be attached to the overlay element */
    overlayRef?: React.RefObject<HTMLDivElement>;
    /** The ListBox's global state */
    state: SelectState<ListBoxOption<OptionKey>> | ComboBoxState<ListBoxOption<OptionKey>>;
    /** An optional footer to render within the Overlay, after the Body */
    footer?: React.ReactElement;
    loading?: boolean;
    /** Additional props that will be spread over the overlay component */
    listBoxProps?: React.HTMLAttributes<Element>;
};
/** An overlay that renders individual ListBox Options */
export declare function ListBoxOverlay<OptionKey extends Key = string>({ id, label, containerRef, listBoxRef: _listBoxRef, overlayRef: _overlayRef, state, footer, loading, listBoxProps: otherProps, }: ListBoxOverlayProps<OptionKey>): JSX.Element;
declare type ListBoxSectionProps<OptionKey extends Key> = {
    /** Title for this Section */
    title: string;
    /** A group of similar options, only visual */
    section: Node<ListBoxOption<OptionKey>>;
    /** The global Select state */
    state: SelectState<ListBoxOption<OptionKey>> | ComboBoxState<ListBoxOption<OptionKey>>;
};
/** A single ListBox Section. This is usually used to (visually) group similar `ListBoxOption`s together */
export declare function ListBoxSection<OptionKey extends Key = string>({ title, section, state, }: ListBoxSectionProps<OptionKey>): JSX.Element;
declare type ListBoxOptionProps<OptionKey extends Key> = {
    /** The option to render */
    option: Node<ListBoxOption<OptionKey>>;
    /** The global Select state */
    state: SelectState<ListBoxOption<OptionKey>> | ComboBoxState<ListBoxOption<Key>>;
};
/** A single `ListBox` Option */
export declare function ListBoxOption<OptionKey extends Key = string>({ option, state, }: ListBoxOptionProps<OptionKey>): JSX.Element;
export declare function ListBoxLoadingOption(): JSX.Element;
declare type ListBoxErrorOptionProps = {
    children?: string;
};
export declare function ListBoxErrorOption({ children, }: ListBoxErrorOptionProps): JSX.Element;
declare type ListBoxEmptyOptionProps = {
    children?: string;
};
export declare function ListBoxEmptyOption({ children, }: ListBoxEmptyOptionProps): JSX.Element;
declare type ListBoxFooterProps = React.PropsWithChildren<{
    onPress?: () => void;
}>;
/** A static footer */
export declare function ListBoxFooter({ children, onPress }: ListBoxFooterProps): JSX.Element;
export {};
