import type { Node } from 'prosemirror-model';
import { Plugin } from 'prosemirror-state';
import { Decoration, type NodeView, type ViewMutationRecord } from 'prosemirror-view';
import type { ReactRenderer, RendererItem } from "../../behavior/ReactRenderer/index.js";
import type { KatexOptions, RunOptions } from "./types.js";
import "./view-and-edit.css";
export type MathNodeViewOptions = Pick<RunOptions, 'sanitize'> & {
    katexOptions?: KatexOptions;
    loadRuntimeScript: () => void;
    reactRenderer: ReactRenderer;
};
export declare abstract class MathNodeView implements NodeView {
    dom: HTMLElement;
    contentDOM: HTMLElement;
    protected node: Node;
    protected texContent: string;
    protected mathViewDOM: HTMLElement;
    protected mathHintContainerDOM: HTMLElement;
    protected hintRendererItem: RendererItem;
    protected readonly reactRenderer: ReactRenderer;
    protected readonly loadRuntimeScript: () => void;
    protected readonly katexRunOptions: RunOptions;
    protected hasActiveDeco: boolean;
    abstract createDOM(): Record<'dom' | 'contentDOM' | 'mathViewDOM' | 'mathHintContainerDOM', HTMLElement> & {
        hintRendererItem: RendererItem;
    };
    abstract isDisplayMode(): boolean;
    constructor(node: Node, opts: MathNodeViewOptions);
    update(node: Node, decos: readonly Decoration[]): boolean;
    ignoreMutation(mutation: ViewMutationRecord): boolean;
    destroy(): void;
    protected renderKatex(): void;
    protected toggleErrorView(isError: boolean): void;
    protected getTexContent(): string;
}
export declare class MathInlineNodeView extends MathNodeView {
    destroy(): void;
    isDisplayMode(): boolean;
    createDOM(): {
        dom: HTMLSpanElement;
        contentDOM: HTMLSpanElement;
        mathViewDOM: HTMLSpanElement;
        mathHintContainerDOM: HTMLDivElement;
        hintRendererItem: RendererItem;
    };
    protected createMathInlineDOM(): {
        container: HTMLSpanElement;
        content: HTMLSpanElement;
    };
}
export declare class MathBlockNodeView extends MathNodeView {
    isDisplayMode(): boolean;
    createDOM(): {
        dom: HTMLDivElement;
        contentDOM: HTMLDivElement;
        mathViewDOM: HTMLDivElement;
        mathHintContainerDOM: HTMLDivElement;
        hintRendererItem: RendererItem;
    };
}
export type MathViewAndEditPluginOptions = MathNodeViewOptions;
export declare const mathViewAndEditPlugin: (options: MathViewAndEditPluginOptions) => Plugin<any>;
