import { ReactElement, FocusEvent, RefObject, MouseEvent, KeyboardEvent } from "react"; import { ITheme } from "../Palette/variables"; export interface ISuggestStyle { isSuggestionsListOpened?: boolean; isDisabled?: boolean; isFocused?: boolean; isSelected?: boolean; hasValue?: boolean; isError?: boolean; isShowError?: boolean; dimension?: TDimension; width?: string; theme: ITheme; } export interface IPropsItem { label: string; value: string; [propName: string]: any; } export interface IProps { autocomplete?: TAutocomplete; dimension?: TDimension; value: string; label?: string; placeholder?: string; width?: string; name?: string; options: IPropsItem[]; isDisabled?: boolean; isError?: boolean; isLoading?: boolean; isVisibleIcons?: boolean; errorMessage?: string; noOptionsMessage?: string | ReactElement; noOptionsMessageTitle?: string; type?: TInputSuggestion; onSelect?: (item: IPropsItem) => void; onBlur?: (event: FocusEvent, value: string) => void; onFocus?: (event: FocusEvent, value: string | undefined) => void; onChange?: (value: string) => void; onSuggestionsFetchRequested?: (value: string) => void; onClear?: (event: MouseEvent) => void; onKeyDown?: (event: KeyboardEvent) => void; optionRender?: (suggestion: IPropsItem, value: string) => ReactElement; getSuggestionRef?: (autosuggestionRef: RefObject) => void; getSuggestionValue?: (suggestion: IPropsItem) => string; getSuggestionsProp?: (value: string, suggestions: IPropsItem[]) => IPropsItem[]; alwaysRenderSuggestions?: boolean; shouldRenderSuggestions?: () => boolean; className?: string; testID?: string; } export interface IState { value: string; suggestions: IPropsItem[]; isLoading?: boolean; isFocused: boolean; isSuggestionsListOpened: boolean; noSuggestions: boolean; currentSuggest: IPropsItem; } export declare type TDimension = "small" | "medium" | "large"; export declare type TInputSuggestion = "tel" | "email" | "number" | "search" | "text" | "url"; export declare type TAutocomplete = "on" | "off" | "new-password";