import React from 'react';
import { IconLookup } from '@fortawesome/fontawesome-svg-core';
import { DropdownPlacementTypes } from '../dropdown';
import { TypeaheadOptionListProps } from './typeahead-option-list';
import { HELPER_TEXT_POSITION } from '../form-field';
import { FormFieldValidity, AsyncValidation } from '../form-field/validity-shape';
import './typeahead.less';
export type TypeaheadOption = Record<string, any> & {
    shouldNotCloseDropdown?: boolean;
    isDisabled?: boolean;
    tooltip?: string;
};
export type TypeaheadItem = Record<string, any> | string;
export type TypeaheadProps = {
    defaultValue?: string;
    searchFields?: string[];
    optionComponent?: React.ReactElement;
    OptionList?: React.FC<TypeaheadOptionListProps>;
    optionId: string;
    optionLabel?: string;
    placement?: DropdownPlacementTypes;
    options?: TypeaheadOption[];
    items?: TypeaheadItem[];
    validity?: FormFieldValidity;
    validationTestId?: string;
    asyncValidation?: AsyncValidation;
    onBlur?: (search: string) => void;
    onSelect?: (option?: TypeaheadOption) => void;
    onSearch?: (value: string) => void;
    onDelete?: (item: TypeaheadItem, index: number) => void;
    onClear?: () => void;
    isMultiSelect?: boolean;
    focused?: boolean;
    isTouched?: boolean;
    /**
     * Forces all possibilities shown on focus regardless of searchValue
     */
    forceShowAllOnFocus?: boolean;
    /**
     * Whether to show all possible options right after the user clicks on the emtpy input
     */
    showAllOnFocus?: boolean;
    isDisabled?: boolean;
    disabledInfo?: string;
    isRequired?: boolean;
    isOptional?: boolean;
    /**
     * Allow clearing selected value by clicking the button.
     */
    isClearable?: boolean;
    helperTextPosition?: HELPER_TEXT_POSITION;
    handleFocus?: (focus: boolean) => void;
    placeholder?: string;
    containerRef?: React.RefObject<HTMLElement>;
    inputRef?: React.RefObject<HTMLInputElement>;
    testId?: string;
    label?: string;
    labelTestId?: string;
    labelIcon?: IconLookup;
    labelIconTooltipText?: string;
    labelIconTestId?: string;
    ariaLabel?: string;
    dropdownContentClass?: string;
    wrapperClass?: string;
    /**
     * The class is applied to input tag
     */
    fieldClass?: string;
    id?: string;
    helperText?: string;
    autoComplete?: string;
    keepInvalidText?: boolean;
    formatSearchValue?: (value?: string) => string;
    className?: string;
    onKeyDown?: (event: React.KeyboardEvent, searchValue: string) => void;
    optionalLabelText?: string;
    autoFocus?: boolean;
    noItemsText?: string;
    /**
     * By default, on select won't be invoked if the label of selected option is the same as defaultValue
     * but there are cases when we do want to call it anyway. In that cases this prop should be set to true
     */
    shouldCallOnSelectWithOldValue?: boolean;
};
/** Searchable select
 * [CAPITALIZATION] Use sentence case for options, label, and input text. Do not end with ellipses (...).
 * @midnight-gray-supported
 * @alpine-light-supported
 */
declare function Typeahead({ defaultValue, onSearch, optionComponent, OptionList, onBlur, onKeyDown, onClear, onSelect, onDelete, searchFields, placement, options, items, optionId, optionLabel, isMultiSelect, focused, isTouched, forceShowAllOnFocus, showAllOnFocus, isDisabled, disabledInfo, isRequired, isOptional, isClearable, optionalLabelText, handleFocus, placeholder, containerRef, inputRef: inputRefProp, helperTextPosition, testId, id, label, labelTestId, ariaLabel, validity, validationTestId, asyncValidation, labelIcon, labelIconTooltipText, labelIconTestId, dropdownContentClass, wrapperClass, fieldClass, helperText, autoComplete, keepInvalidText, formatSearchValue, className, autoFocus, noItemsText, shouldCallOnSelectWithOldValue, }: TypeaheadProps): import("react/jsx-runtime").JSX.Element;
export default Typeahead;
