import type { ReactNode, KeyboardEvent as ReactKeyboardEvent, Ref } from 'react';
import type { NoChildrenProp, TestIdProp, WithAttributes } from '../../types';
import type { FormControlProps } from '../FormControl';
import type { MenuItemProps, MenuProps } from '../Menu/Menu.types';
export interface Selected {
    id: string;
    text: string;
}
type ComboBoxProps = WithAttributes<'input', TestIdProp & NoChildrenProp & {
    /** Pass a string or a fragment with an Icon and string. */
    label?: FormControlProps['label'];
    /** Visually hides the label region. */
    labelHidden?: FormControlProps['labelHidden'];
    /** Set visual state based on a validation state. */
    status?: FormControlProps['status'];
    /** It is recommended to pass a simple string to offer guidance. Text will be styled based on status prop. */
    info?: FormControlProps['info'];
    /**
     * Whether it is single selection or multi selection combobox.
     * @default 'single-select'
     */
    mode?: 'single-select' | 'multi-select';
    /** Currently selected option, single for single-select, an array for multi-select. */
    selected?: {
        items?: Selected | Selected[];
        onRemove?: (id: MenuItemProps['id'], index: number) => void;
        onNew?: (text: string) => void;
    };
    /** Value of the combobox filtering input. */
    value?: FormControlProps['value'];
    /** Callback fired when the ComboBox input gains focus. */
    onFocus?: (selected?: Selected | Selected[]) => void;
    /**
     * Callback fired when the ComboBox looses focus within its containing element.
     * This is not specific to the input element.
     * Note, behavior will be enhanced in an upcoming release and the input will be the only focusable element.
     */
    onBlur?: (selected?: Selected | Selected[]) => void;
    /** Callback fired when AI suggestion is accepted/rejected */
    onResolveSuggestion?: FormControlProps['onResolveSuggestion'];
    /**
     * Fired when the user clicks on the dropdown icon to initiate opening the menu.
     * If you want to offer default menu items without an input value, pass this function.
     * This function can be an appropriate time to fetch menu item data.
     * Remember to set the loading prop to true when fetching data for an empty list.
     *
     * @param open value defining whether the click opens or closes the menu
     */
    onDropdownButtonClick?: (open: boolean) => void;
    /** Fired when menu opens. */
    onMenuOpen?: () => void;
    /** Fired before running default component onKeyDown handler.
     * Returning `false` from this function prevents default onKeyDown handling.
     */
    onKeyDown?: (e: ReactKeyboardEvent) => boolean | void;
    /** Action Buttons that will render within the input. */
    actions?: ReactNode;
    /** Menu related props. @see MenuProps */
    menu?: MenuProps;
    /** A visual which represents the selected item. */
    visual?: ReactNode;
    /** Pass a heading and content to show additional information on the field. */
    additionalInfo?: FormControlProps['additionalInfo'];
    /** Reference to the element. */
    ref?: Ref<HTMLDivElement>;
}>;
export type { ComboBoxProps as default };
//# sourceMappingURL=ComboBox.types.d.ts.map