import React, { ReactNode, FocusEvent, KeyboardEvent } from 'react';
import { FieldTrim } from '../data-set/enum';
import { TextAreaProps } from '../text-area/interface';
import TextArea from '../text-area';
import { OptionProps } from './Option';
import { filterOption as defaultFilterOption, validateSearch as defaultValidateSearch } from './utils';
export interface MentionsConfig {
    mentionsKey?: string | string[];
    split?: string;
}
export interface MentionsEntity {
    mentionsKey: string;
    value: string;
}
export declare type Placement = 'top' | 'bottom';
export interface MentionsProps extends TextAreaProps {
    notFoundContent?: ReactNode;
    split?: string;
    transitionName?: string;
    placement?: Placement;
    mentionsKey?: string | string[];
    filterOption?: false | typeof defaultFilterOption;
    validateSearch?: typeof defaultValidateSearch;
    onSelect?: (option: OptionProps, mentionsKey: string) => void;
    onSearch?: (text: string, mentionsKey: string) => void;
    getPopupContainer?: (triggerNode: Element) => HTMLElement;
    loading?: boolean;
}
declare class Mentions<T extends MentionsProps = MentionsProps> extends TextArea<T> {
    static displayName: string;
    static Option: React.SFC<OptionProps>;
    static getMentions: (value: string, config?: MentionsConfig) => MentionsEntity[];
    static defaultProps: {
        suffixCls: string;
        rows: number;
        trim: FieldTrim;
        mentionsKey: string;
        split: string;
        validateSearch: typeof defaultValidateSearch;
        filterOption: typeof defaultFilterOption;
        autoSize: boolean;
        clearButton: boolean;
        multiple: boolean;
        border: boolean;
        valueChangeAction: import("../text-field/enum").ValueChangeAction;
        waitType: import("../core/enum").WaitType;
        readOnly: boolean;
        disabled: boolean;
        noValidate: boolean;
    };
    measure?: HTMLDivElement;
    focusId: number | undefined;
    measuring: boolean;
    measureText: string | null;
    measurePrefix: string;
    measureLocation: number;
    activeIndex: number;
    selectionLocation: number;
    constructor(props: MentionsProps, context: any);
    initObservableObj(): void;
    componentDidUpdate(): void;
    getNotFoundContent(): T["notFoundContent"];
    getOtherProps(): any;
    getOmitPropsKeys(): string[];
    select(): void;
    handleKeyDown(event: KeyboardEvent<HTMLTextAreaElement>): void;
    /**
     * When to start measure:
     * 1. When user press `mentionsKey`
     * 2. When measureText !== prevMeasureText
     *  - If measure hit
     *  - If measuring
     *
     * When to stop measure:
     * 1. Selection is out of range
     * 2. Contains `space`
     * 3. ESC or select one
     */
    handleKeyUp(event: KeyboardEvent<HTMLTextAreaElement>): void;
    onDropdownFocus(): void;
    onDropdownBlur(): void;
    handleFocus(event?: FocusEvent<HTMLTextAreaElement>): void;
    handleBlur(event?: FocusEvent<HTMLTextAreaElement>): void;
    selectOption(option: OptionProps): void;
    setActiveIndex(activeIndex: number): void;
    setMeasureRef(element: HTMLDivElement): void;
    getOptions(measureText?: string): OptionProps[];
    startMeasure(measureText: string, measurePrefix: string, measureLocation: number): void;
    stopMeasure(): void;
    wrapperInputNode(): ReactNode;
}
export default Mentions;
