import type * as React from 'react';
export interface AutocompleteItem extends Omit<React.HTMLAttributes<'option'>, 'name'> {
    /**
     * Unique identifier for this item
     */
    id: string;
    /**
     * Displayed value of the item. May alternatively provide a `children` value
     */
    name?: string;
    /**
     * Custom React node as an alternative to a string-only `name`
     */
    children?: React.ReactNode;
    /**
     * Whether this item should be counted as one of the results for the purpose of announcing the
     * result count to screen readers
     * @deprecated This is no longer used, as we no longer have custom messaging for screen readers
     * @hide-prop [Deprecated]
     */
    isResult?: boolean;
}
export interface AutocompleteItemGroup {
    /**
     * Label displayed as the group header in the autocomplete menu.
     */
    label: string;
    /**
     * Array of items contained within this group.
     * Each item should conform to the `AutocompleteItem` type.
     */
    items: AutocompleteItem[];
    /**
     * Unique identifier for the group.
     */
    id: string;
}
export type AutocompleteItems = Array<AutocompleteItem | AutocompleteItemGroup>;
export interface AutocompleteProps {
    /**
     * Screen reader-specific label for the Clear search `<button>`. Intended to provide a longer, more descriptive explanation of the button's behavior.
     */
    ariaClearLabel?: string;
    /**
     * Control the `TextField` autocomplete attribute. Defaults to "off" to support accessibility. [Read more.](https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion)
     */
    autoCompleteLabel?: string;
    /**
     * Must contain a `TextField` component
     */
    children: React.ReactNode;
    /**
     * Additional classes to be added to the root element.
     * Useful for adding utility classes.
     */
    className?: string;
    /**
     * Text rendered on the page if `clearInput` prop is passed. Default is "Clear search".
     */
    clearInputText?: React.ReactNode;
    /**
     * Removes the Clear search button when set to `false`
     */
    clearSearchButton?: boolean;
    autoFocus?: boolean;
    /**
     * @deprecated This is deprecated in favor of autoFocus
     * @hide-prop [Deprecated]
     */
    focusTrigger?: boolean;
    /**
     * A unique id to be passed to the child `TextField`. If no id is passed as a prop,
     * the `Autocomplete` component will auto-generate one. This prop was provided in cases
     * where an id might need to be passed to multiple components, such as the `htmlFor`
     * attribute on a label and the id of an input.
     */
    id?: string;
    /**
     * Customize the default status messages announced to screen reader users via aria-live when autocomplete results are populated.
     * @deprecated This is no longer used
     * @hide-prop [Deprecated]
     */
    getA11yStatusMessage?: any;
    /**
     * Access a reference to the child `TextField`'s `input` element
     */
    inputRef?: React.Ref<any> | React.MutableRefObject<any>;
    /**
     * Used to determine the string value for the selected item (which is used to compute the `inputValue`).
     * @deprecated Please provide a `name` property to each item instead.
     * @hide-prop [Deprecated]
     */
    itemToString?: (item: AutocompleteItem) => string;
    /**
     * Array of objects used to populate the suggestion list that appears below the input as users type.
     * Passing an empty array will show a "No results" message. If you do not yet want to show results,
     * this props should be undefined.
     */
    items?: AutocompleteItems;
    /**
     * Adds a heading to the top of the autocomplete list. This can be used to convey to the user that they're required to select an option from the autocomplete list.
     */
    label?: React.ReactNode;
    /**
     * A unique `id` to be used on the child `TextField` label tag
     */
    labelId?: string;
    /**
     * Can be called when the `items` array is being fetched remotely, or will be delayed for more than 1-2 seconds.
     */
    loading?: boolean;
    /**
     * Message users will see when the `loading` prop is passed to `Autocomplete`.
     */
    loadingMessage?: React.ReactNode;
    /**
     * Message users will see when the `items` array returns empty and the `loading` prop is passed to `<Autocomplete />`.
     */
    noResultsMessage?: React.ReactNode;
    /**
     * Called when the user selects an item and the selected item has changed. Called with the item that was selected.
     */
    onChange?: (selectedItem: AutocompleteItem) => void;
    /**
     * Called when the child `TextField` value changes. Is called with a string representing the input value.
     */
    onInputValueChange?: (inputValue: string) => void;
}
/**
 * The Autocomplete component wraps a TextField component and turns it into a combobox,
 * where a user can type into the text field and see matching results. They can then
 * select one of these results from the list, which will trigger an `onChange` event on
 * the Autocomplete.
 *
 * The two event handlers that should be used when this is a controlled component are
 * `onChange` and `onInputValueChange`. They are defined on the Autocomplete component
 * and not its child TextField component.
 *
 * As the user types and `onInputValueChange` is called, you should be supplying relevant
 * results to the Autocomplete through the `items` prop. The `items` prop is an array of
 * objects. Passing an empty array will show a "No results" message. If you do not yet
 * want to show results—for instance, because they haven't typed enough characters yet to
 * make a database call—the `items` prop should remain be undefined. If you are still
 * loading the results, use the `loading` boolean prop to display the loading message to
 * the user.
 *
 * For information about how and when to use this component,
 * [refer to its full documentation page](https://design.cms.gov/components/autocomplete/).
 */
export declare const Autocomplete: {
    (props: AutocompleteProps): import("react/jsx-runtime").JSX.Element;
    defaultProps: {
        autoCompleteLabel: string;
        clearSearchButton: boolean;
    };
};
export default Autocomplete;
