import PropTypes from 'prop-types'; import React from 'react'; declare const propTypes: { /** Input props. All HTMLInput props can be added too */ input: PropTypes.Validator any>; /** Search by term handler (fired on enter or when clicking the search button) */ onSearch: PropTypes.Validator<(...args: any[]) => any>; /** Change term handler */ onChange: PropTypes.Validator<(...args: any[]) => any>; /** Term to be searched */ value: PropTypes.Requireable; /** Determine if the input and button should be disabled */ disabled: PropTypes.Requireable; }>>; /** Options props. More details in the examples */ options: PropTypes.Validator; /** * Function that makes possible to the dev to customly render option. * Called with all props needed: `(props: { key: string, selected: boolean, value: OptionValue, searchTerm: string, roundedBottom: boolean, icon: ReactElement, onClick: () => void }, index: number)` and should return a React Node */ renderOption: PropTypes.Requireable<(...args: any[]) => any>; /** * List of options. * An option could be a string (denoting a search by term) or an object * with `{value: any, label: string}` (denoting the search is related to an entity). */ value: PropTypes.Validator<(string | PropTypes.InferProps<{ value: PropTypes.Requireable; label: PropTypes.Validator; }>)[]>; /** * Icon representing the entity. * Shown when a value is an object to show the difference */ icon: PropTypes.Requireable; /** * Callback called when an option is selected * (clicked or via arrow keys + enter) */ onSelect: PropTypes.Validator<(...args: any[]) => any>; /** * Last searched terms. Can be used to enhance the Autocomplete experience. * Defined with: `{ * value: OptionValue[], * onChange: (term: string | OptionValue) => any, * label: string * }` */ lastSearched: PropTypes.Requireable; label: PropTypes.Validator; }>)[]>; /** * Last searched change handler. * Called when a term is searched or an option is selected. */ onChange: PropTypes.Requireable<(...args: any[]) => any>; /** Last Searched options's title */ label: PropTypes.Validator; }>>; }>>; }; declare const AutocompleteInput: React.FunctionComponent>; export default AutocompleteInput;