import React from 'react'; import { ClassValue } from 'classnames/types'; import { SupportedIconName } from '../../shared/icons'; import { BaseInputPropsWithoutChildren } from '../Input/BaseInput'; import { OptionListOption } from '../OptionList/OptionList'; import { ArrayElementType } from '../../types/utils/ArrayElementType'; import { CreateProps } from '../../types/utils/CreateProps'; declare type AutocompleteProps = CreateProps<{ /** Label shown on the autocomplete */ label?: string; /** List of options */ options: OptionListOption[]; /** Selected option value to be shown in the autocomplete */ value?: string; /** OnChange handler when user types in the autocomplete input or makes a selection, will return the value and native event (value, event) */ onChange: (event: React.SyntheticEvent, option: string) => void; /** onOptionSelect is called when user makes selection from the list. It will return whole option object and native event (option, event)*/ onOptionSelect?: (event: React.SyntheticEvent, option: OptionListOption) => void; /** Type of the autocomplete value */ type?: SupportedInputType; /** Placeholder is visible when the autocomplete is empty */ placeholder?: string; /** Sets the autocomplete in readonly state. Autocomplete is clickable and focusable but user can't type in it */ readonly?: boolean; /** Icon to be displayed. Is not visible if input is in the errornous or confirmed state */ iconName?: SupportedIconName; /** OnClick handler for the icon */ onIconClick?: () => void; /** Custom id */ id?: string; /** Custom className */ className?: ClassValue; children?: undefined; }, BaseInputPropsWithoutChildren>; declare const Autocomplete: React.FunctionComponent; export declare const supportedInputTypes: readonly ["text", "password", "email", "tel", "search"]; export declare type SupportedInputType = ArrayElementType; export default Autocomplete;