import { Key } from '@react-types/shared';
import { ForwardedRef, ReactElement, ReactNode, RefObject } from 'react';
import { Section as BaseSection, Item } from 'react-stately';
import { CubeCollectionItemProps } from 'src/components/CollectionItem';
import { Styles } from '../../../tasty';
import { CubeListBoxProps } from '../ListBox/ListBox';
import type { Collection, Node } from '@react-types/shared';
import type { FieldBaseProps } from '../../../shared';
type FilterFn = (textValue: string, inputValue: string) => boolean;
export interface CubeFilterListBoxProps<T> extends Omit<CubeListBoxProps<T>, 'filter'>, FieldBaseProps {
    /** Placeholder text for the search input */
    searchPlaceholder?: string;
    /** Whether the search input should have autofocus */
    autoFocus?: boolean;
    /**
     * Custom filter function for determining if an option should be included in search results.
     * Pass `false` to disable internal filtering completely (useful for external filtering).
     */
    filter?: FilterFn | false;
    /** Custom label to display when no results are found after filtering */
    emptyLabel?: ReactNode;
    /** Custom styles for the search input */
    searchInputStyles?: Styles;
    /** Whether the FilterListBox is in loading state (shows loading icon in search input) */
    isLoading?: boolean;
    /** Ref for accessing the search input element */
    searchInputRef?: RefObject<HTMLInputElement | null>;
    /** Whether to allow entering custom values that are not present in the predefined options */
    allowsCustomValue?: boolean;
    /** Additional modifiers for styling the FilterListBox */
    mods?: Record<string, boolean>;
    /** Custom styles for the list box */
    listBoxStyles?: Styles;
    /**
     * Callback fired when the user presses Escape key while the search input is empty.
     * Can be used by parent components (e.g. FilterPicker) to close an enclosing Dialog.
     */
    onEscape?: () => void;
    /**
     * Whether to show checkboxes for multiple selection mode.
     * This adds a checkbox icon to the left of each option.
     */
    isCheckable?: boolean;
    /**
     * Callback fired when an option is clicked but not on the checkbox area.
     * Used by FilterPicker to close the popover on non-checkbox clicks.
     */
    onOptionClick?: (key: Key) => void;
    /**
     * Props to apply to existing custom values (values that are already selected but not in the predefined options).
     */
    customValueProps?: Partial<CubeCollectionItemProps<T>>;
    /**
     * Props to apply to new custom values (values typed in the search input that are about to be added).
     * These are merged with customValueProps for new custom values.
     */
    newCustomValueProps?: Partial<CubeCollectionItemProps<T>>;
    /**
     * Controlled search value. When provided, the search input becomes controlled.
     * Use with `onSearchChange` to manage the search state externally.
     */
    searchValue?: string;
    /**
     * Callback fired when the search input value changes.
     * Use with `searchValue` for controlled search input.
     */
    onSearchChange?: (value: string) => void;
    /**
     * Pre-built collection to use instead of creating a new one.
     * Used internally by FilterPicker to avoid duplicate collection creation.
     * @internal
     */
    _internalCollection?: Collection<Node<any>>;
}
export declare const FilterListBox: (<T>(props: CubeFilterListBoxProps<T> & {
    ref?: ForwardedRef<HTMLDivElement>;
}) => ReactElement) & {
    Item: typeof Item;
    Section: typeof BaseSection;
};
export {};
