import type { CommonEditor, MarkupString } from "../common/index.js";
import type { Logger2 } from "../logger.js";
import type { Receiver } from "../utils/index.js";
import type { EventMap } from "./events.js";
import type { MarkdownEditorMode } from "./preset-base-types.js";
export type ChangeEditorModeOptions = {
    mode: MarkdownEditorMode;
    reason: 'error-boundary' | 'settings' | 'manually';
    emit?: boolean;
};
export interface MarkdownEditorInstance extends Receiver<EventMap>, CommonEditor {
    readonly logger: Logger2.LogReceiver;
    readonly currentMode: MarkdownEditorMode;
    readonly toolbarVisible: boolean;
    /** Whether the full-screen markup preview is currently visible. */
    readonly previewVisible: boolean;
    setEditorMode(mode: MarkdownEditorMode, opts?: Pick<ChangeEditorModeOptions, 'emit'>): void;
    moveCursor(position: 'start' | 'end' | {
        line: number;
    }): void;
    insert(markup: MarkupString): void;
    /**
     * Control the full-screen markup preview.
     * Pass `true`/`false` to explicitly show/hide it, or call with no argument to toggle.
     * No-op if `renderPreview` is not configured or split mode is currently enabled.
     */
    changePreviewVisible(visible?: boolean): void;
}
