/**
 * @file Select
 * @description
 * @author fex
 * @date 2017-11-07
 */
import * as React from 'react';
import 'react-datetime/css/react-datetime.css';
import { ControllerStateAndHelpers } from 'downshift';
import { noop } from '../utils/helper';
import { ClassNamesFn } from '../theme';
export interface Option {
    label?: string;
    value?: any;
    disabled?: boolean;
    children?: Options;
    visible?: boolean;
    hidden?: boolean;
    [propName: string]: any;
}
export interface Options extends Array<Option> {
}
export interface OptionProps {
    multi?: boolean;
    multiple?: boolean;
    valueField?: string;
    options: Options;
    joinValues?: boolean;
    extractValue?: boolean;
    delimiter?: string;
    clearable?: boolean;
    placeholder?: string;
}
export declare type OptionValue = string | number | null | undefined | Option;
export declare function value2array(value: OptionValue | Array<OptionValue>, props: Partial<OptionProps>): Array<Option>;
export declare function expandValue(value: OptionValue, props: Partial<OptionProps>): Option | null;
export declare function normalizeOptions(options: string | {
    [propName: string]: string;
} | Array<string> | Options): Options;
interface SelectProps {
    classPrefix: string;
    classnames: ClassNamesFn;
    className?: string;
    creatable: boolean;
    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;
    promptTextCreator: (label: string) => string;
    onChange: (value: void | string | Option | Array<Option>) => void;
    onNewOptionClick: (value: Option) => void;
    onFocus?: Function;
    onBlur?: Function;
}
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;
        searchPromptText: string;
        loadingPlaceholder: string;
        noResultsText: string;
        clearAllText: string;
        clearValueText: string;
        placeholder: string;
        valueField: string;
        labelField: string;
        spinnerClassName: string;
        promptTextCreator: (label: string) => string;
        onNewOptionClick: typeof noop;
        inline: boolean;
        disabled: boolean;
    };
    input: HTMLInputElement;
    target: HTMLElement;
    constructor(props: SelectProps);
    componentDidMount(): void;
    componentWillReceiveProps(nextProps: SelectProps): void;
    open(): void;
    close(): void;
    toggle(): void;
    onFocus(e: any): void;
    onBlur(e: any): void;
    focus(): void;
    blur(): void;
    getTarget(): HTMLElement;
    inputRef(ref: HTMLInputElement): 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;
    renderValue({ inputValue, isOpen }: ControllerStateAndHelpers<any>): JSX.Element | (JSX.Element | null)[] | null;
    renderOuter({ selectedItem, getItemProps, highlightedIndex, inputValue, isOpen }: ControllerStateAndHelpers<any>): JSX.Element;
    render(): JSX.Element;
}
declare const _default: React.ComponentClass<Pick<Pick<SelectProps, "loading" | "value" | "options" | "searchable" | "className" | "classPrefix" | "classnames" | "onFocus" | "onBlur" | "onChange" | "loadOptions" | "popOverContainer"> & Partial<Pick<SelectProps, "disabled" | "inline" | "multiple" | "valueField" | "labelField" | "placeholder" | "clearable" | "creatable" | "searchPromptText" | "loadingPlaceholder" | "spinnerClassName" | "noResultsText" | "clearAllText" | "clearValueText" | "promptTextCreator" | "onNewOptionClick">> & Partial<Pick<{
    multiple: boolean;
    clearable: boolean;
    creatable: boolean;
    searchPromptText: string;
    loadingPlaceholder: string;
    noResultsText: string;
    clearAllText: string;
    clearValueText: string;
    placeholder: string;
    valueField: string;
    labelField: string;
    spinnerClassName: string;
    promptTextCreator: (label: string) => string;
    onNewOptionClick: typeof noop;
    inline: boolean;
    disabled: boolean;
}, never>>, "disabled" | "loading" | "inline" | "multiple" | "value" | "valueField" | "labelField" | "options" | "searchable" | "className" | "placeholder" | "onFocus" | "onBlur" | "onChange" | "clearable" | "creatable" | "loadOptions" | "searchPromptText" | "loadingPlaceholder" | "spinnerClassName" | "noResultsText" | "clearAllText" | "clearValueText" | "popOverContainer" | "promptTextCreator" | "onNewOptionClick"> & {
    theme?: string | undefined;
    classPrefix?: string | undefined;
    classnames?: ClassNamesFn | undefined;
}, any> & {
    ComposedComponent: typeof Select;
};
export default _default;
