import { Ref } from 'vue';
import { EditorCore } from '../../foundation/editorManager/editor';
import { PausationTagPlugin } from '../../plugins/PausationTagPlugin';
import { IAnchor, ICommandExecutor, IContentManager, ICursorManager, IUndoManager, PluginFlag } from '../../typings';
import { PronunciationTagPlugin } from '../../plugins/PronunciationTagPlugin';
import { AnchorTagPlugin } from '../../plugins/AnchorTagPlugin';
import { HomophonesTagPlugin } from '../../plugins/HomophonesTagPlugin';
import { EditorComponentProps } from '../../typings/intersection/editor';
import { ContentOptions } from '../components/editor/context';
export interface PluginMap {
    [PluginFlag.pausation]: PausationTagPlugin;
    [PluginFlag.pronunciation]: PronunciationTagPlugin;
    [PluginFlag.homophones]: HomophonesTagPlugin;
    [PluginFlag.anchor]: AnchorTagPlugin;
}
export interface EditorAction {
    base: {
        content: IContentManager;
        cursor: ICursorManager;
        undo: IUndoManager;
        command: ICommandExecutor;
    };
    plugin: PluginMap;
}
export interface AnchorData {
    background: string;
    data: IAnchor;
    id: number;
}
export type AnchorMap = Record<string, AnchorData[]>;
export declare const useEditor: (editor: Ref<HTMLDivElement | undefined>, props: EditorComponentProps, emit: ((event: "change", contentLength: number) => void) & ((event: "update:textCount", value: number) => void) & ((event: "anchorListen", value: IAnchor, text: string) => void) & ((event: "anchorRemove", value: IAnchor) => void)) => {
    editorCore: Ref<EditorCore<[]> | undefined, EditorCore<[]> | undefined>;
    editorAction: Ref<EditorAction | undefined, EditorAction | undefined>;
    count: Ref<number, number>;
    hasPausationTag: Ref<boolean, boolean>;
    getContent: (_options?: ContentOptions) => string;
    setContent: (content: string) => Promise<void>;
    appendContent: (content: string | string[]) => Promise<void>;
    getTextContent: () => string[];
    insertContent: (content: string | Node) => void;
    deleteContent: () => void;
    updateContent: (content: string | Node) => void;
    isCaret: () => boolean;
    isRange: () => boolean;
    isSelectionInDifferentParas: () => boolean;
    isSelectionContainsTag: (type: PluginFlag) => boolean;
    getAnchorTtsMark: (id: number, startFromCursor?: boolean) => string;
    getAnchorTtsEmotionAndRole: (id: number) => [string, string | undefined];
    isAllMarkedByAnchor: () => boolean;
    addExtraAnchors: (data: IAnchor[]) => void;
    clearContent: () => void;
    insertContentAtCursor: (_content: string | string[]) => void;
    renderHighlight: (matchingContent: string) => void;
    unrenderHighlight: () => void;
};
