import React from "react";
import { EditorPlugin } from "@draft-js-plugins/editor";
import { EditorState, RawDraftContentState } from "draft-js";
import TurndownService from "turndown";
import { RichTextEditorProps, RichTextEditor, RichTextEditorState } from "../RichTextEditor";
import { DropResult } from "react-beautiful-dnd";
import { IDataDefinition } from "../../Common/Data/Definitions/IDataDefinition";
import { XExecutionData } from "../../Common/Data/ExecutionData/XExecutionData";
import { XTextMergeDefinition } from "./XTextMergeDefinition";
import { XTextMergeEditContext } from "./XTextMergeEditContext";
export declare const turndownService: TurndownService;
export interface ITextMerge extends RichTextEditorProps {
    definition: XTextMergeDefinition;
    editContext: XTextMergeEditContext;
    onChange?: (value: RawDraftContentState) => void;
}
export interface ITextMergeState extends RichTextEditorState {
    currentEntity: string;
    field: IDataDefinition | undefined;
    fieldpath: string;
    openVariablePicker: boolean;
    openPreview: boolean;
    openVariablePanel: boolean;
    previewContext: XExecutionData;
    tempEditState: EditorState | undefined;
}
export default class XTextMerge extends RichTextEditor<ITextMerge, ITextMergeState> {
    plugins: EditorPlugin[];
    static contextType: React.Context<import("../../Common/Testing/TestResultData").BaseTestResultData | undefined>;
    constructor(props: ITextMerge);
    renderToolbar(): JSX.Element | null;
    renderListFields: (fields: IDataDefinition[], keys?: string[]) => JSX.Element;
    getCurrentHTML: () => string;
    onChange: (editorState: EditorState) => void;
    handleClick: () => void;
    onCloseOpenVariablePicker: () => void;
    onUpdateValue: (fieldpath: string, newValue: any) => void;
    showModalWithEntity: (entity: string) => void;
    onCloseVariablePicker: () => void;
    onVariableSet: (path: string, def?: IDataDefinition | undefined) => 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;
}
