"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BlockquoteSpecs = exports.isBlockqouteNode = exports.blockquoteType = exports.blockquoteNodeName = void 0;
const schema_1 = require("../../../../utils/schema.js");
exports.blockquoteNodeName = 'blockquote';
exports.blockquoteType = (0, schema_1.nodeTypeFactory)(exports.blockquoteNodeName);
const isBlockqouteNode = (node) => node.type.name === exports.blockquoteNodeName;
exports.isBlockqouteNode = isBlockqouteNode;
const BlockquoteSpecs = (builder) => {
    builder.addNode(exports.blockquoteNodeName, () => ({
        spec: {
            content: 'block+',
            group: 'block',
            defining: true,
            parseDOM: [{ tag: 'blockquote' }],
            toDOM() {
                return ['blockquote', 0];
            },
            selectable: true,
        },
        fromMd: { tokenSpec: { name: exports.blockquoteNodeName, type: 'block' } },
        toMd: (state, node) => {
            state.wrapBlock('> ', null, node, () => state.renderContent(node));
        },
    }));
};
exports.BlockquoteSpecs = BlockquoteSpecs;
//# sourceMappingURL=index.js.map
