"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.YfmHtmlBlock = void 0;
const YfmHtmlBlockNodeView_1 = require("./YfmHtmlBlockNodeView/index.js");
const YfmHtmlBlockSpecs_1 = require("./YfmHtmlBlockSpecs/index.js");
const const_1 = require("./YfmHtmlBlockSpecs/const.js");
const actions_1 = require("./actions.js");
const YfmHtmlBlock = (builder, { useConfig: _, ...options }) => {
    builder.use(YfmHtmlBlockSpecs_1.YfmHtmlBlockSpecs, {
        nodeView: YfmHtmlBlockNodeViewFactory(options),
        ...options,
    });
    builder.addAction(const_1.YfmHtmlBlockAction, () => actions_1.addYfmHtmlBlock);
};
exports.YfmHtmlBlock = YfmHtmlBlock;
const YfmHtmlBlockNodeViewFactory = (options) => () => (node, view, getPos) => {
    return new YfmHtmlBlockNodeView_1.WYfmHtmlBlockNodeView({ node, view, getPos, options });
};
//# sourceMappingURL=index.js.map
