import { WMermaidNodeView } from "./MermaidNodeView/index.js";
import { MermaidSpecs } from "./MermaidSpecs/index.js";
import { MermaidAction } from "./MermaidSpecs/const.js";
import { addMermaid } from "./actions.js";
export const Mermaid = (builder, { loadRuntimeScript }) => {
    builder.use(MermaidSpecs, {
        nodeView: MermaidNodeViewFactory({ loadRuntimeScript }),
    });
    builder.addAction(MermaidAction, () => addMermaid);
};
const MermaidNodeViewFactory = ({ loadRuntimeScript }) => () => (node, view, getPos) => {
    return new WMermaidNodeView(node, view, getPos, { loadRuntimeScript });
};
//# sourceMappingURL=index.js.map
