export type AutoSuggestSuggestion = {
    /**
     * The text label for a suggestion item. If present, this will be returned when selecting the suggestion.
     */
    label?: string;
    /**
     * Set to disable the suggestion and disallow selecting it.
     *
     * @default false
     */
    disabled?: boolean;
    /**
     * Optional custom suggestion node that will be rendered as given. Example, this is used by the TagManager
     * to render a placeholder with an icon next to it.
     */
    customSuggestion?: React.ReactNode;
    /**
     * Additional key-value pairs that are not relevant for rendering but may be handled on your side.
     */
    [name: string]: string | React.ReactNode;
};
export type SelectedSuggestion = {
    suggestionValue: string | React.ReactElement;
    suggestion: AutoSuggestSuggestion;
};
export type AutoSuggestInputProps = {
    /**
     * A native input id attribute. Passed through as HTML attribute to the input element.
     */
    id?: string;
    /**
     * The value to be set for the input. Using this prop the input can be controlled from the outside.
     */
    value?: string;
    /**
     * String that will be displayed inside the input when nothing is typed in.
     * @default `Start typing ...`
     */
    placeholder?: string | React.ReactNode;
    /**
     * Icon class name that shall be used. If defined, the input element is wrapped in an input-group
     * and the icon will be set in an input-addon. Example: `rioglyph-search`.
     */
    icon?: string;
    /**
     * Callback function which will be called when the input changes. __This is usually not needed__ as
     * the "onSuggestionsFetchRequested" callback takes care of any input change. It is listed here
     * for completeness and for certain edge cases.
     *
     * __Note:__ It might be removed in the future when not needed.'
     * @deprecated please use `onSuggestionsFetchRequested` instead
     * @param changeEvent
     * @param changeProps
     * @returns
     */
    onChange?: (changeEvent: React.SyntheticEvent, changeProps: {
        newValue: string;
    }) => void;
    /**
     * Callback function which gets triggered when the input gaines focus.
     */
    onFocus?: VoidFunction;
    /**
     * Callback function which gets triggered when the input looses the focus.
     */
    onBlur?: VoidFunction;
    /**
     * Callback function which will be called when the input is cleared. __This is usually not needed__ as
     * the "onSuggestionsFetchRequested" callback takes care of any input change. It is listed here
     * for completeness and for certain edge cases.
     *
     * __Note:__ It might be removed in the future when not needed.
     */
    onClear?: VoidFunction;
    /**
     * Boolean value that adds the class `has-error` to the input
     * component. Use this for validation use cases. The Autosuggest component
     * should be wrapped in a `form-group` element with the class `has-feedback`.
     * @default false
     */
    hasError?: boolean;
    /**
     * Defines the tab index to be added to the input element.
     * @default 0
     */
    tabIndex?: number;
    /**
     * Boolean value that disabled the input component.
     * @default false
     */
    disabled?: boolean;
    /**
     * The React ref for the underlying input.
     */
    inputRef?: React.MutableRefObject<HTMLInputElement>;
    /**
     * Additional class names that are added to the input component.
     */
    className?: string;
};
export type AutoSuggestProps<T = AutoSuggestSuggestion> = {
    /**
     * A native input id attribute on the component root. Passed through as HTML attribute to the input element.
     */
    id?: string;
    /**
     * Object to define properties for the input component. For the input, the ClearableInput
     * component is used.
     */
    inputProps?: AutoSuggestInputProps;
    /**
     * Array of items which will be displayed. Items can be arbitrary objects as long as they
     * have a label defined.
     *
     * __Important__: in case you specify your own custom renderer via `renderSuggestion` prop, you
     * can pass our own object that does not need to have a label. In this case you may want to
     * specify the `customSuggestionKey` to avoid react throwing an error of rendering menu items with the same key.
     */
    suggestions?: AutoSuggestSuggestion[];
    /**
     * Text that will be shown when there is not match found. If nothing is defined the dropdown-menu
     * will not be rendered.
     */
    noItemMessage?: string | React.ReactNode;
    /**
     * Callback function which will be called every time you need to recalculate suggestions e.i.
     * when the filter is updates after each input. It will also be called when the input is
     * cleared. The value would be an empty string in this case.
     * @param result
     * @returns
     */
    onSuggestionsFetchRequested?: (result: {
        value: string;
    }) => void;
    /**
     * Callback function which will be called when a suggestion is selected from the dropdown menu.
     * @param event
     * @param selectedSuggestion
     * @returns
     */
    onSuggestionSelected?: (event: React.MouseEvent<HTMLLIElement> | React.KeyboardEvent<HTMLDivElement>, selectedSuggestion: SelectedSuggestion) => void;
    /**
     * Callback function which will be called every time the highlighted selection changes.
     * @param suggestion
     * @returns
     */
    onSuggestionHighlighted?: (suggestion: AutoSuggestSuggestion | null) => void;
    /**
     * Function that returns a string which will be displayed inside the input.
     * This is required when a custom render function for suggestions is provided.
     * Overwrite this function to provide the value to be used for a suggestion.
     * Default implementation is: `suggestion => suggestion.label`
     *
     * @param suggestion
     * @returns
     */
    getSuggestionValue?: (suggestion: AutoSuggestSuggestion) => string;
    /**
     * Function that defines how suggestions are rendered on the dropdown-menu.
     * Use this to customize the appearance for instance when you want to show an icon
     * for a suggestion.
     * Default implementation is: `suggestion => suggestion.label`
     *
     * @param suggestion
     * @returns
     */
    renderSuggestion?: (suggestion: AutoSuggestSuggestion) => React.ReactNode;
    /**
     * When rendering your own custom suggestions that do not have the `label` attribute, use this prop to specify
     * a unique value for each suggestion which will be used as a react key for the individual menu items.
     */
    customSuggestionKey?: string;
    /**
     * Boolean that disabled autoDropDirection and opens the dropdown-menu be above the toggle.
     * @default false
     */
    dropup?: boolean;
    /**
     * Defines whether the dropdown opens right aligned or not.
     * Set to true additionally disables autoDrop feature.
     * @default false
     */
    pullRight?: boolean;
    /**
     * Boolean that enables autoDrop feature.
     * @default true
     */
    autoDropDirection?: boolean;
    /**
     * Shows a loading spinner instead of the items if set to true.
     * @default false
     */
    isLoading?: boolean;
    /**
     * Boolean that enables opening the dropdown menu when gaining focus.
     * @default false
     */
    openOnFocus?: boolean;
    /**
     * Boolean that enables the selection of an item to close the dropdown or not.
     * @default true
     */
    closeOnSelect?: boolean;
    /**
     * Defines whether or not a selected item is shown in the input after it was selected.
     * @default true
     */
    showSelectedItemsInInput?: boolean;
    /**
     * Sets autocomplete value for autosuggest forms.
     */
    autoComplete?: string;
    /**
     * Adds a list of input-addons elements in front of the input.
     */
    leadingInputAddons?: React.ReactNode[];
    /**
     * Adds a list of input-addons elements after the input.
     */
    trailingInputAddons?: React.ReactNode[];
    /**
     * Additional class names that are added to the dropdown element.
     */
    dropdownClassName?: string;
    /**
     * Additional class names that are added to the wrapping element.
     */
    className?: string;
};
export declare const AutoSuggest: (props: AutoSuggestProps) => import("react/jsx-runtime").JSX.Element;
export default AutoSuggest;
