export interface ChangeEventPayload { target: { name: string; value: unknown; }; } export interface AutocompleteProps { id: string; fieldId: string; disabled?: boolean; error?: string | null; readonly?: boolean; /** A list of items or a function that takes a query and callback method, which is called with the resultant list of items. */ source: any[] | ((query: string, callback: (results: any[]) => void) => void); /** The structure of the item. If this is not provided, it is assumed to be a string. */ item?: { value: string; label: string; format: string; } | { value: string; label: string; } | null; /** The selected item. */ value?: any; /** Deprecated. Use value. */ defaultValue?: any; /** Whether the menu of items should overlay elements below it or move those elements down the page. */ displayMenu?: 'overlay' | 'inline'; /** Whether all values should be shown when the input is selected. */ showAllValues?: boolean; /** The text that should appear in the input when it is empty. */ placeholder?: string; /** Functions for formatting the labels that appear in the options menu and in the input when a selection is made. */ templates?: { inputValue?: (item: any) => string; suggestion?: (item: any) => string; }; /** Handler for when the value changes. */ onChange?: (event: ChangeEventPayload) => void; /** Deprecated. Use onChange. */ onConfirm?: (value: any) => void; classBlock?: string; className?: string; [key: string]: any; } export declare const DEFAULT_CLASS = "hods-autocomplete"; /** Make a page easier to scan by letting users reveal more detailed information only if they need it. * Autocomplete uses [Accessible Autocomplete] to perform its function, and "passes on" parameters for that component. As an example the `showAllValues` attribute determines whether the component lists the possible values immediately on selection. Autocomplete sorts the provided options in the following order 1. Options beginning with the search phrase 2. Options with words beginning with the search phrase 3. Options with words containing the search phrase Modules using this component often replace the search algorithm by use of the `source` attribute. [Accessible Autocomplete]: https://github.com/alphagov/accessible-autocomplete */ export declare const Autocomplete: ({ id, fieldId, disabled, error, readonly, source, item, value, displayMenu, showAllValues, placeholder, templates, onChange, classBlock, className, onConfirm: _onConfirm, defaultValue, ...attrs }: AutocompleteProps) => import("react/jsx-runtime").JSX.Element; export declare const RefDataAutocomplete: ({ ...attrs }: AutocompleteProps) => import("react/jsx-runtime").JSX.Element;