"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.imgSizeNodeViewPlugin = void 0;
const prosemirror_state_1 = require("prosemirror-state");
const react_utils_1 = require("../../../../../react-utils/index.js");
const const_1 = require("../../const.js");
const NodeView_1 = require("./NodeView.js");
const imgSizeNodeViewPlugin = (deps) => new prosemirror_state_1.Plugin({
    key: const_1.imageRendererKey,
    state: {
        init: () => undefined,
        apply: (tr) => {
            return tr.getMeta(const_1.imageRendererKey);
        },
    },
    props: {
        nodeViews: {
            [const_1.imageNodeName]: (0, react_utils_1.reactNodeViewFactory)(NodeView_1.ImageNodeView, {
                isInline: true,
                reactNodeWrapperCn: (0, NodeView_1.cnImgSizeNodeView)('wrapper'),
            })(deps),
        },
    },
});
exports.imgSizeNodeViewPlugin = imgSizeNodeViewPlugin;
//# sourceMappingURL=index.js.map
