import { ReactNode } from 'react';
import { IReactionDisposer } from 'mobx';
import { IInstance } from 'react-codemirror2';
import { FormField, FormFieldProps } from '../field/FormField';
import { CodeAreaFormatter } from './CodeAreaFormatter';
import { ThemeSwitch } from './enum';
export { ThemeSwitch, };
export interface CodeAreaProps extends FormFieldProps {
    options?: any;
    formatHotKey?: string;
    unFormatHotKey?: string;
    formatter?: CodeAreaFormatter;
    editorDidMount?: (editor: IInstance, value: string, cb: () => void) => void;
    themeSwitch?: ThemeSwitch;
}
export default class CodeArea extends FormField<CodeAreaProps> {
    static displayName: string;
    static defaultProps: {
        suffixCls: string;
        formatHotKey: string;
        unFormatHotKey: string;
        readOnly: boolean;
        disabled: boolean;
        noValidate: boolean;
        trim: import("../data-set/enum").FieldTrim;
    };
    cmOptions: any;
    text?: string;
    midText: string;
    disposer: IReactionDisposer;
    theme?: string;
    constructor(props: any, content: any);
    componentWillUnmount(): void;
    handleBeforeChange(_editor: any, _data: any, value: any): void;
    handleCodeMirrorKeyDown(cm: any, e: any): void;
    getCodeMirrorOptions(options?: any): any;
    getOmitPropsKeys(): string[];
    getOtherProps(): any;
    getOtherClassName(otherProps: any): string;
    setThemeWrapper(nextProps: any): void;
    componentWillReceiveProps(nextProps: any, nextContext: any): void;
    handleThemeChange: (value: any) => void;
    getHeader: () => JSX.Element | null;
    elementReference(node: any): void;
    renderWrapper(): ReactNode;
    setTheme(theme?: string): void;
    setText(text?: string): void;
    getTextNode(value?: any): ReactNode;
    processValue(value: any): ReactNode;
    /**
     * 编辑器失去焦点时，调用父类方法，同步DataSet中的内容
     *
     * @memberof CodeArea
     */
    handleCodeMirrorBlur: ((codeMirrorInstance: IInstance) => void) & import("mobx").IAction;
    /**
     * 在CodeMirror编辑器实例挂载前添加额外配置
     *
     * @memberof CodeArea
     */
    handleCodeMirrorDidMount: (editor: IInstance, value: string, cb: () => void) => void;
}
