import React, { SyntheticEvent } from "react";
import { Room, MatrixEvent } from "matrix-js-sdk/src/matrix";
import EditorModel from "../../../editor/model";
import { Caret } from "../../../editor/caret";
import { Formatting } from "./MessageComposerFormatBar";
import DocumentOffset from "../../../editor/offset";
import { IDiff } from "../../../editor/diff";
import AutocompleteWrapperModel from "../../../editor/autocomplete";
import DocumentPosition from "../../../editor/position";
export declare const REGEX_EMOTICON: RegExp;
interface IProps {
    model: EditorModel;
    room: Room;
    threadId?: string;
    placeholder?: string;
    label?: string;
    initialCaret?: DocumentOffset;
    disabled?: boolean;
    onChange?(selection?: Caret, inputType?: string, diff?: IDiff): void;
    onPaste?(event: Event | SyntheticEvent, data: DataTransfer, model: EditorModel): boolean;
}
interface IState {
    useMarkdown: boolean;
    showPillAvatar: boolean;
    query?: string;
    showVisualBell?: boolean;
    autoComplete?: AutocompleteWrapperModel;
    completionIndex?: number;
    surroundWith: boolean;
}
export default class BasicMessageEditor extends React.Component<IProps, IState> {
    readonly editorRef: React.RefObject<HTMLDivElement>;
    private autocompleteRef;
    private formatBarRef;
    private modifiedFlag;
    private isIMEComposing;
    private hasTextSelected;
    private readonly isSafari;
    private _isCaretAtEnd;
    private lastCaret;
    private lastSelection;
    private readonly useMarkdownHandle;
    private readonly emoticonSettingHandle;
    private readonly shouldShowPillAvatarSettingHandle;
    private readonly surroundWithHandle;
    private readonly historyManager;
    constructor(props: IProps);
    componentDidUpdate(prevProps: IProps): void;
    replaceEmoticon(caretPosition: DocumentPosition, regex: RegExp): number | undefined;
    private updateEditorState;
    private showPlaceholder;
    private hidePlaceholder;
    private onCompositionStart;
    private onCompositionEnd;
    isComposing(event: React.KeyboardEvent): boolean;
    private onCutCopy;
    private onCopy;
    private onCut;
    private onPasteHandler;
    private onPaste;
    private onBeforeInput;
    private onInput;
    private insertText;
    private setLastCaretFromPosition;
    private refreshLastCaretIfNeeded;
    clearUndoHistory(): void;
    getCaret(): DocumentOffset;
    isSelectionCollapsed(): boolean;
    isCaretAtStart(): boolean;
    isCaretAtEnd(): boolean;
    private onBlur;
    private onFocus;
    private onSelectionChange;
    private onKeyDown;
    private tabCompleteName;
    isModified(): boolean;
    private onAutoCompleteConfirm;
    private onAutoCompleteSelectionChange;
    private configureUseMarkdown;
    private configureEmoticonAutoReplace;
    private configureShouldShowPillAvatar;
    private surroundWithSettingChanged;
    private transform;
    componentWillUnmount(): void;
    componentDidMount(): void;
    private getInitialCaretPosition;
    onFormatAction: (action: Formatting) => void;
    render(): React.ReactNode;
    focus(): void;
    insertMention(userId: string): void;
    insertQuotedMessage(event: MatrixEvent): void;
    insertPlaintext(text: string): void;
}
export {};
