import { DownshiftState, GetItemPropsOptions, StateChangeOptions } from 'downshift'; import React, { PureComponent, ReactNode } from 'react'; declare const Placement: { top: string; bottom: string; }; declare type Placement = 'top' | 'bottom'; export interface ITypeaheadItem { label: string; value: string; icon?: ReactNode; } interface ITypeaheadProps { readonly autoOpen?: boolean; readonly clearOnSelect?: boolean; readonly defaultValue?: string; readonly placement?: Placement; readonly isLoading?: boolean; readonly items: ReadonlyArray; readonly limit?: number; readonly menuHeight?: number; readonly onClearSelection?: () => void; readonly onClose?: () => void; readonly onInputValueChange?: (inputValue: string) => void; readonly onOpen?: () => void; readonly onSelect?: (item: ITypeaheadItem) => void; readonly placeholder?: string; readonly value?: string; } interface IState { showScrollArrow: boolean; } declare const defaultProps: { limit: number; menuHeight: number; placement: string; }; declare type MyProps = typeof defaultProps & ITypeaheadProps; export default class Typeahead extends PureComponent { static defaultProps: { limit: number; menuHeight: number; placement: string; }; constructor(props: MyProps); inputRef: React.RefObject; listRef: React.RefObject; componentDidMount(): void; clearSelection: (downshiftClearSelection: () => void) => () => void; getHintText: (inputValue: string, itemText: string) => string; stateReducer: (state: DownshiftState, changes: StateChangeOptions) => { inputValue?: string | null | undefined; type: import("downshift").StateChangeTypes; highlightedIndex?: number | null | undefined; isOpen?: boolean | undefined; selectedItem?: ITypeaheadItem | null | undefined; } | { highlightedIndex: number; inputValue: string | null; isOpen: boolean; selectedItem: ITypeaheadItem | null; }; handleStateChange: (changes: StateChangeOptions) => void; createRenderListItem: ({ clearSelection, getItemProps, highlightedIndex, }: { clearSelection: () => void; getItemProps: (options: GetItemPropsOptions) => any; highlightedIndex: null | number; }) => (item: ITypeaheadItem, index: number) => JSX.Element; showArrowIfNecessary: () => void | null; handleListScroll: (e: any) => void; render(): JSX.Element; } export {};