import type { CommonEditor } from "../common/index.js";
import type { TransformFn } from "../core/markdown/ProseMirrorTransformer/index.js";
import type { ReactRenderStorage } from "../extensions/index.js";
import { type Receiver } from "../utils/index.js";
import type { DirectiveSyntaxContext } from "../utils/directive.js";
import type { MarkdownEditorMode as EditorMode, MarkdownEditorPreset as EditorPreset, MarkdownEditorOptions } from "./types.js";
export type ToolbarActionData = {
    editorMode: EditorMode;
    id: string;
    attrs?: {
        [key: string]: any;
    };
};
export interface EventMap {
    change: null;
    cancel: null;
    submit: null;
    'toolbar-action': ToolbarActionData;
    'change-editor-mode': {
        mode: EditorMode;
    };
    'change-toolbar-visibility': {
        visible: boolean;
    };
    'change-split-mode-enabled': {
        splitModeEnabled: boolean;
    };
}
export interface Editor extends Receiver<EventMap>, CommonEditor {
    readonly currentMode: EditorMode;
    readonly toolbarVisible: boolean;
    setEditorMode(mode: EditorMode, opts?: SetEditorModeOptions): void;
    moveCursor(position: 'start' | 'end' | {
        line: number;
    }): void;
}
type SetEditorModeOptions = Pick<ChangeEditorModeOptions, 'emit'>;
export type ChangeEditorModeOptions = {
    mode: EditorMode;
    reason: 'error-boundary' | 'settings' | 'manually';
    emit?: boolean;
};
export type EditorOptions = Pick<MarkdownEditorOptions, 'md' | 'initial' | 'handlers' | 'experimental' | 'markupConfig' | 'wysiwygConfig'> & {
    renderStorage: ReactRenderStorage;
    preset: EditorPreset;
    directiveSyntax: DirectiveSyntaxContext;
    pmTransformers: TransformFn[];
};
export {};
