import { FC, Ref } from 'react';
import 'codemirror/lib/codemirror.css';
import 'codemirror/theme/3024-day.css';
import 'codemirror/theme/3024-night.css';
import 'codemirror/addon/fold/foldgutter.css';
import 'codemirror/addon/fold/foldcode.js';
import 'codemirror/addon/fold/foldgutter.js';
import 'codemirror/addon/fold/brace-fold.js';
import 'codemirror/addon/fold/comment-fold.js';
import 'codemirror/addon/fold/indent-fold.js';
import 'codemirror/addon/hint/show-hint.css';
import 'codemirror/addon/hint/show-hint.js';
import 'codemirror/addon/comment/comment.js';
import 'codemirror/addon/selection/active-line.js';
import 'codemirror/mode/yaml/yaml.js';
import 'codemirror/mode/shell/shell.js';
import 'codemirror/mode/python/python.js';
import 'codemirror/addon/edit/closebrackets.js';
import 'codemirror/addon/edit/matchbrackets.js';
import 'codemirror/addon/lint/lint.js';
import 'codemirror/addon/lint/lint.css';
import 'codemirror/addon/lint/yaml-lint.js';
import 'codemirror/addon/scroll/simplescrollbars.js';
import 'codemirror/addon/scroll/simplescrollbars.css';
export interface CodeEditProps {
    /** @description 编码语言 @default yaml */
    mode?: 'shell' | 'python' | 'yaml';
    /** 编辑器宽度 */
    width: number;
    /** 编辑器高度 */
    height: number;
    /** @description 编辑器最小高度 @default 40px */
    minHeight?: number;
    /** 编辑器实例 */
    editor?: Ref<CodeEditInstance>;
    /** 默认代码内容 */
    defaultCode?: string;
    /** 自定义样式类型 */
    className?: string;
    /** @description 编辑器大小是否可修改 @default true */
    resize?: boolean;
    /** @description 编辑器是否刷新默认值 @default true*/
    refreshDefault?: boolean;
    /** @description 编辑器是否聚焦,失焦状态下部分敏感信息会用*号展示,聚焦时显示原文 @default true */
    isFocus?: boolean;
    /** @description 检测的敏感词 @default [{startWord:"password:"}] */
    sensitiveWords?: {
        startWord: string;
        endWord?: string;
        lastStartWord?: boolean;
    }[];
    /** @description 使用外部自定义的滚动条样式 @default false*/
    useCustomScroll?: boolean;
    /** @description 是否开启预览模式 @default false*/
    preview?: boolean;
    /** @description 把指定位置滚动到可视范围内*/
    scrollIntoView?: {
        line: number;
        ch: number;
    };
    /** @description 预览模式下是否隐藏行号 @default true*/
    hideLineNumbers?: boolean;
    /** 输入框内容变化时的回调 */
    onChange?: (value: string) => void;
}
export interface CodeEditInstance {
    /** 检验代码语法 */
    validateCode: () => Promise<any>;
    /** 获取输入的代码 */
    getCode: () => string | undefined;
}
declare const CodeEdit: FC<CodeEditProps>;
export default CodeEdit;
