import React from "react";
import { EditorPlugin } from "@draft-js-plugins/editor";
import { EditorState, RawDraftContentState } from "draft-js";
import TurndownService from "turndown";
import { RichTextEditor, RichTextEditorProps, RichTextEditorState } from "../../CommonUI/RichTextEditor";
import { DropResult } from "react-beautiful-dnd";
import { IDataDefinition } from "@appglue/common/dist/Common/Data/Definitions/IDataDefinition";
import { TextMergeConfiguration } from "@appglue/common/dist/TextMerge/TextMergeConfiguration";
import { TextMergeEditContext } from "@appglue/common/dist/TextMerge/TextMergeEditContext";
export declare const turndownService: TurndownService;
export interface ITextMerge extends RichTextEditorProps {
    definition: TextMergeConfiguration;
    editContext: TextMergeEditContext;
    onChange?: (value: RawDraftContentState) => void;
}
export interface ITextMergeState extends RichTextEditorState {
    openVariablePicker: boolean;
    openPreview: boolean;
    openVariablePanel: boolean;
    previewContext: object;
}
export default class TextMergeEditor extends RichTextEditor<ITextMerge, ITextMergeState> {
    static contextType: React.Context<import("@appglue/common/dist/Common/Testing/BaseTestResultData").BaseTestResultData | undefined>;
    plugins: EditorPlugin[];
    constructor(props: ITextMerge);
    renderToolbar(): JSX.Element | null;
    renderListFields: (fields: IDataDefinition[], keys?: string[]) => JSX.Element;
    getCurrentHTML: () => string;
    onChange: (editorState: EditorState) => void;
    onInsertField: () => void;
    onCloseOpenVariablePicker: () => void;
    onUpdateValue: (fieldpath: string, newValue: any) => void;
    showModalWithEntity: (entity: string) => void;
    onCloseVariablePicker: () => void;
    onVariableSet: (path: string, def?: IDataDefinition) => void;
    isValidField: (fieldpath: string) => boolean;
    onTogglePanel: () => void;
    onOpenPreviewModal: () => void;
    onClosePreviewModal: () => void;
    onDragUpdate: (result: DropResult) => void;
    onDragEnd: (result: DropResult) => void;
    renderEditor(): JSX.Element;
    render(): JSX.Element;
}
