import { Component } from "react";
import * as React from "react";
export type LayoutRendererArgs = {
    valuesList: React.ReactNode;
    optionsList: React.ReactNode;
    isFocused: boolean;
    isAllSelected: boolean;
    isFiltered: boolean;
    onClose: () => void;
};
export type TokenFieldProps = {
    value: any[];
    onChange: (value: any[]) => void;
    options: any[];
    placeholder?: string | undefined;
    multi?: boolean;
    validateValue?: (value: any) => boolean;
    parseFreeformValue?: (value: any) => any;
    updateOnInputChange?: boolean;
    optionRenderer?: (option: any) => React.ReactNode;
    valueRenderer?: (value: any) => React.ReactNode;
    layoutRenderer?: (args: LayoutRendererArgs) => React.ReactNode;
    color?: "brand";
    style?: React.CSSProperties;
    className?: string;
    valueStyle?: React.CSSProperties;
    optionsStyle?: React.CSSProperties;
    optionsClassName?: string;
    prefix?: string;
    canAddItems?: boolean;
    autoFocus?: boolean;
    removeSelected?: boolean;
    idKey?: string | ((option: any) => string);
    valueKey?: string | ((option: any) => string);
    labelKey?: string | ((option: any) => string);
    onFocus?: () => void;
    onBlur?: () => void;
    onInputKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
    onInputChange?: (value: string) => string | void;
    updateOnInputBlur?: boolean;
    filterOption?: (options: any[], filter: string) => boolean;
};
type TokenFieldState = {
    inputValue: string;
    searchValue: string;
    filteredOptions: any[];
    selectedOptionValue: any;
    isFocused: boolean;
    isAllSelected: boolean;
    listIsHovered: boolean;
};
declare class _TokenField extends Component<TokenFieldProps, TokenFieldState> {
    inputRef: React.RefObject<HTMLInputElement>;
    scrollElement: null;
    constructor(props: TokenFieldProps);
    UNSAFE_componentWillMount(): void;
    UNSAFE_componentWillReceiveProps(nextProps: TokenFieldProps): void;
    setInputValue(inputValue: any, setSearchValue?: boolean): void;
    clearInputValue(clearSearchValue?: boolean): void;
    _id(value: any): any;
    _value(option: any): any;
    _label(option: any): any;
    _key(option: any): string;
    _isLastFreeformValue(inputValue: any): boolean | undefined;
    _updateFilteredValues: (props: TokenFieldProps) => void;
    onInputChange: ({ target: { value }, }: React.ChangeEvent<HTMLInputElement>) => void;
    onInputKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;
    onInputFocus: () => void;
    onInputBlur: () => void;
    onInputPaste: (e: React.ClipboardEvent<HTMLInputElement>) => void;
    onMouseDownCapture: (e: React.MouseEvent<HTMLElement>) => void;
    onClose: () => void;
    addSelectedOption(e: React.KeyboardEvent<HTMLInputElement>): boolean | undefined;
    addOption: (option: any) => void;
    addValue(valueToAdd: any, replaceLast?: boolean): void;
    removeValue(valueToRemove: any): void;
    _valueIsEqual(v1: any, v2: any): boolean;
    componentDidUpdate(prevProps: TokenFieldProps, prevState: TokenFieldState): void;
    render(): string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
}
/**
 * @deprecated use MultiSelect or Autocomplete from metabase/ui
 */
declare const TokenField: typeof _TokenField & {
    FieldItem: import("@emotion/styled").StyledComponent<{
        theme?: import("@emotion/react").Theme | undefined;
        as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
    } & {
        isValid: boolean;
    }, React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, {}>;
    NewItemInputContainer: import("@emotion/styled").StyledComponent<{
        theme?: import("@emotion/react").Theme | undefined;
        as?: React.ElementType<any, keyof React.JSX.IntrinsicElements> | undefined;
    }, React.DetailedHTMLProps<React.LiHTMLAttributes<HTMLLIElement>, HTMLLIElement>, {}>;
};
export default TokenField;
