import { ReactNode } from 'react';
import { Merge } from '../utils';
import { WithInputAttributesProps } from './contexts';
import { ButtonProps } from '../button/Button.types';
export interface SelectInputOptionItem<T = string> {
    type: 'option';
    value: T;
    filterMatchers?: readonly string[];
    disabled?: boolean;
}
export interface SelectInputGroupItem<T = string> {
    type: 'group';
    label: ReactNode;
    options: readonly SelectInputOptionItem<T>[];
    action?: {
        label: string;
        onClick: ButtonProps['onClick'];
    };
}
export interface SelectInputSeparatorItem {
    type: 'separator';
}
export type SelectInputItem<T = string> = SelectInputOptionItem<T> | SelectInputGroupItem<T> | SelectInputSeparatorItem;
export interface SelectInputProps<T = string, M extends boolean = false> {
    id?: string;
    /**
     * Sets the `data-wds-parent` attribute on the listbox container, which is needed for complex components like DateInput to correctly manage event handling.
     * @internal
     */
    parentId?: string;
    name?: string;
    multiple?: M;
    placeholder?: string;
    items: readonly SelectInputItem<NonNullable<T>>[];
    /**
     * Enables browser autocomplete integration through the search input.
     * Accepts standard HTML autocomplete values (e.g., "country-name", "address-level1").
     *
     * Requires `filterable={true}` to enable the search input.
     *
     * @example
     * <SelectInput
     *   name="country"
     *   autocomplete="country-name"
     *   filterable={true}
     *   items={[{
     *     type: 'option',
     *     value: 'GB',
     *     filterMatchers: ['United Kingdom', 'UK']
     *   }]}
     * />
     */
    autocomplete?: string;
    defaultValue?: M extends true ? readonly T[] : T;
    value?: M extends true ? readonly T[] : T;
    compareValues?: (keyof NonNullable<T> & string) | ((a: T | undefined, b: T | undefined) => boolean);
    renderValue?: (value: NonNullable<T>, withinTrigger: boolean) => React.ReactNode;
    renderFooter?: (args: {
        resultsEmpty: boolean;
        queryNormalized: string | null | undefined;
    }) => React.ReactNode;
    renderTrigger?: (args: {
        content: React.ReactNode;
        placeholderShown: boolean;
        clear: (() => void) | undefined;
        disabled: boolean;
        size: 'sm' | 'md' | 'lg';
        className: string | undefined;
    }) => React.ReactNode;
    filterable?: boolean;
    filterPlaceholder?: string;
    sortFilteredOptions?: (a: SelectInputOptionItem<NonNullable<T>>, b: SelectInputOptionItem<NonNullable<T>>, searchQuery: string) => number;
    disabled?: boolean;
    size?: 'sm' | 'md' | 'lg';
    className?: string;
    UNSAFE_triggerButtonProps?: WithInputAttributesProps['inputAttributes'] & {
        'aria-label'?: string;
    };
    /** Ref to the select trigger button element. */
    triggerRef?: React.MutableRefObject<HTMLButtonElement | null>;
    onFilterChange?: (args: {
        query: string;
        queryNormalized: string | null;
    }) => void;
    onChange?: (value: M extends true ? T[] : T) => void;
    onOpen?: () => void;
    onClose?: () => void;
    onClear?: () => void;
}
export declare function SelectInput<T = string, M extends boolean = false>({ id: idProp, parentId, name, multiple, placeholder, autocomplete, items, defaultValue, value: controlledValue, compareValues, renderValue, renderFooter, renderTrigger, filterable, filterPlaceholder, sortFilteredOptions, disabled, size, className, UNSAFE_triggerButtonProps, triggerRef: externalTriggerRef, onFilterChange, onChange, onOpen, onClose, onClear, }: SelectInputProps<T, M>): import("react").JSX.Element;
type SelectInputTriggerButtonElementType = 'button' | React.ComponentType;
export type SelectInputTriggerButtonProps<T extends SelectInputTriggerButtonElementType = 'button'> = Merge<React.ComponentPropsWithoutRef<T>, {
    as?: T;
}>;
export declare function SelectInputTriggerButton<T extends SelectInputTriggerButtonElementType = 'button'>({ as, ...restProps }: SelectInputTriggerButtonProps<T>): import("react").JSX.Element;
export interface SelectInputOptionContentProps {
    title: string;
    note?: string;
    description?: string;
    icon?: React.ReactNode;
}
export declare function SelectInputOptionContent({ title, note, description, icon, }: SelectInputOptionContentProps): import("react").JSX.Element;
export {};
//# sourceMappingURL=SelectInput.d.ts.map