"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Image = exports.ImageAttr = exports.imageType = exports.imageNodeName = void 0;
const lodash_1 = require("../../../lodash.js");
const ImageSpecs_1 = require("./ImageSpecs/index.js");
const actions_1 = require("./actions.js");
const const_1 = require("./const.js");
const imageUrlPaste_1 = require("./imageUrlPaste/index.js");
var ImageSpecs_2 = require("./ImageSpecs/index.js");
Object.defineProperty(exports, "imageNodeName", { enumerable: true, get: function () { return ImageSpecs_2.imageNodeName; } });
Object.defineProperty(exports, "imageType", { enumerable: true, get: function () { return ImageSpecs_2.imageType; } });
Object.defineProperty(exports, "ImageAttr", { enumerable: true, get: function () { return ImageSpecs_2.ImageAttr; } });
const Image = (builder, opts) => {
    builder.use(ImageSpecs_1.ImageSpecs);
    builder.addAction(const_1.addImageAction, ({ schema }) => (0, actions_1.addImage)(schema));
    if ((0, lodash_1.isFunction)(opts?.parseInsertedUrlAsImage)) {
        builder.use(imageUrlPaste_1.imageUrlPaste, {
            parseInsertedUrlAsImage: opts.parseInsertedUrlAsImage,
        });
    }
};
exports.Image = Image;
//# sourceMappingURL=index.js.map
