"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Mermaid = void 0;
const MermaidNodeView_1 = require("./MermaidNodeView/index.js");
const MermaidSpecs_1 = require("./MermaidSpecs/index.js");
const const_1 = require("./MermaidSpecs/const.js");
const actions_1 = require("./actions.js");
const Mermaid = (builder, options) => {
    builder.use(MermaidSpecs_1.MermaidSpecs, {
        nodeView: MermaidNodeViewFactory(options),
    });
    builder.addAction(const_1.MermaidAction, () => actions_1.addMermaid);
};
exports.Mermaid = Mermaid;
const MermaidNodeViewFactory = (options) => () => (node, view, getPos) => {
    return new MermaidNodeView_1.WMermaidNodeView(node, view, getPos, options);
};
//# sourceMappingURL=index.js.map
