/**
 * @file Select
 * @description
 * @author fex
 * @date 2017-11-07
 */
import React from 'react';
import { ControllerStateAndHelpers } from 'downshift';
import { ClassNamesFn } from '../theme';
export interface Option {
    label?: string;
    value?: any;
    disabled?: boolean;
    children?: Options;
    visible?: boolean;
    hidden?: boolean;
    description?: string;
    [propName: string]: any;
}
export interface Options extends Array<Option> {
}
export interface OptionProps {
    className?: string;
    multi?: boolean;
    multiple?: boolean;
    valueField?: string;
    simpleValue?: boolean;
    options: Options;
    joinValues?: boolean;
    extractValue?: boolean;
    delimiter?: string;
    clearable?: boolean;
    placeholder?: string;
    disabled?: boolean;
    creatable?: boolean;
    onAdd?: (idx?: number | Array<number>, value?: any, skipForm?: boolean) => void;
    editable?: boolean;
    onEdit?: (value: Option, origin?: Option, skipForm?: boolean) => void;
    removable?: boolean;
    onDelete?: (value: Option) => void;
}
export declare type OptionValue = string | number | null | undefined | Option;
export declare function value2array(value: OptionValue | Array<OptionValue>, props: Pick<OptionProps, 'multi' | 'multiple' | 'delimiter' | 'valueField' | 'options'>): Array<Option>;
export declare function expandValue(value: OptionValue, options: Options, valueField?: string): Option | null;
export declare function matchOptionValue(a: OptionValue, b: Option, valueField?: string): boolean;
export declare function optionValueCompare(a: OptionValue, valueField?: string): (b: Option) => boolean;
export declare function normalizeOptions(options: string | {
    [propName: string]: string;
} | Array<string> | Options): Options;
interface SelectProps extends OptionProps {
    classPrefix: string;
    classnames: ClassNamesFn;
    className?: string;
    creatable: boolean;
    createBtnLabel: string;
    multiple: boolean;
    valueField: string;
    labelField: string;
    searchable?: boolean;
    options: Array<Option>;
    value: any;
    loadOptions?: Function;
    searchPromptText: string;
    loading?: boolean;
    loadingPlaceholder: string;
    spinnerClassName?: string;
    noResultsText: string;
    clearable: boolean;
    clearAllText: string;
    clearValueText: string;
    placeholder: string;
    inline: boolean;
    disabled: boolean;
    popOverContainer?: any;
    overlayPlacement?: string;
    onChange: (value: void | string | Option | Array<Option>) => void;
    onFocus?: Function;
    onBlur?: Function;
    checkAll?: boolean;
    checkAllLabel?: string;
    defaultCheckAll?: boolean;
    simpleValue?: boolean;
    defaultOpen?: boolean;
}
interface SelectState {
    isOpen: boolean;
    isFocused: boolean;
    inputValue: string;
    highlightedIndex: number;
    selection: Array<Option>;
}
export declare class Select extends React.Component<SelectProps, SelectState> {
    static defaultProps: {
        multiple: boolean;
        clearable: boolean;
        creatable: boolean;
        createBtnLabel: string;
        searchPromptText: string;
        loadingPlaceholder: string;
        noResultsText: string;
        clearAllText: string;
        clearValueText: string;
        placeholder: string;
        valueField: string;
        labelField: string;
        spinnerClassName: string;
        inline: boolean;
        disabled: boolean;
        checkAll: boolean;
        checkAllLabel: string;
        defaultCheckAll: boolean;
        overlayPlacement: string;
    };
    input: HTMLInputElement;
    target: HTMLElement;
    menu: React.RefObject<HTMLDivElement>;
    constructor(props: SelectProps);
    componentDidMount(): void;
    componentWillReceiveProps(nextProps: SelectProps): void;
    open(): void;
    close(): void;
    toggle(e?: React.MouseEvent<HTMLDivElement>): void;
    onFocus(e: any): void;
    onBlur(e: any): void;
    focus(): void;
    blur(): void;
    getTarget(): HTMLElement;
    inputRef(ref: HTMLInputElement): void;
    toggleCheckAll(): void;
    removeItem(index: number, e?: React.MouseEvent<HTMLElement>): void;
    handleInputChange(evt: React.ChangeEvent<HTMLInputElement>): void;
    handleChange(selectItem: any): void;
    handleStateChange(changes: any): void;
    handleKeyPress(e: React.KeyboardEvent): void;
    clearValue(e: React.MouseEvent<any>): void;
    handleAddClick(): void;
    handleEditClick(e: Event, item: any): void;
    handleDeleteClick(e: Event, item: any): void;
    renderValue({ inputValue, isOpen }: ControllerStateAndHelpers<any>): JSX.Element | JSX.Element[];
    renderOuter({ selectedItem, getItemProps, highlightedIndex, inputValue, isOpen, getToggleButtonProps, getInputProps }: ControllerStateAndHelpers<any>): JSX.Element;
    render(): JSX.Element;
}
declare const _default: React.ComponentClass<Pick<Pick<SelectProps, "loading" | "value" | "delimiter" | "joinValues" | "extractValue" | "options" | "searchable" | "className" | "classPrefix" | "classnames" | "onFocus" | "onBlur" | "onChange" | "popOverContainer" | "multi" | "simpleValue" | "onAdd" | "editable" | "onEdit" | "removable" | "onDelete" | "loadOptions" | "defaultOpen"> & Partial<Pick<SelectProps, "disabled" | "inline" | "multiple" | "valueField" | "labelField" | "placeholder" | "clearable" | "overlayPlacement" | "spinnerClassName" | "creatable" | "noResultsText" | "createBtnLabel" | "searchPromptText" | "loadingPlaceholder" | "clearAllText" | "clearValueText" | "checkAll" | "checkAllLabel" | "defaultCheckAll">> & Partial<Pick<{
    multiple: boolean;
    clearable: boolean;
    creatable: boolean;
    createBtnLabel: string;
    searchPromptText: string;
    loadingPlaceholder: string;
    noResultsText: string;
    clearAllText: string;
    clearValueText: string;
    placeholder: string;
    valueField: string;
    labelField: string;
    spinnerClassName: string;
    inline: boolean;
    disabled: boolean;
    checkAll: boolean;
    checkAllLabel: string;
    defaultCheckAll: boolean;
    overlayPlacement: string;
}, never>>, "disabled" | "loading" | "inline" | "multiple" | "value" | "delimiter" | "valueField" | "labelField" | "joinValues" | "extractValue" | "options" | "searchable" | "className" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "clearable" | "popOverContainer" | "overlayPlacement" | "spinnerClassName" | "multi" | "simpleValue" | "creatable" | "onAdd" | "editable" | "onEdit" | "removable" | "onDelete" | "noResultsText" | "createBtnLabel" | "loadOptions" | "searchPromptText" | "loadingPlaceholder" | "clearAllText" | "clearValueText" | "checkAll" | "checkAllLabel" | "defaultCheckAll" | "defaultOpen"> & {
    theme?: string | undefined;
    classPrefix?: string | undefined;
    classnames?: ClassNamesFn | undefined;
}, any> & {
    ComposedComponent: typeof Select;
};
export default _default;
