"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Html = exports.HtmlNode = exports.HtmlAttr = void 0;
const logger_1 = require("../../../logger.js");
const const_1 = require("./const.js");
const parser_1 = require("./parser.js");
const schema_1 = require("./schema.js");
const serializer_1 = require("./serializer.js");
var const_2 = require("./const.js");
Object.defineProperty(exports, "HtmlAttr", { enumerable: true, get: function () { return const_2.HtmlAttr; } });
Object.defineProperty(exports, "HtmlNode", { enumerable: true, get: function () { return const_2.HtmlNode; } });
const Html = (builder) => {
    if (builder.context.has('html') && builder.context.get('html') === false) {
        logger_1.logger.info('[HTML extension]: Skip extension, because HTML disabled via context');
        return;
    }
    builder.addNode(const_1.HtmlNode.Block, () => ({
        spec: schema_1.schemaSpecs[const_1.HtmlNode.Block],
        fromMd: { tokenSpec: parser_1.parserTokens[const_1.HtmlNode.Block] },
        toMd: serializer_1.serializerTokens[const_1.HtmlNode.Block],
    }));
    builder.addNode(const_1.HtmlNode.Inline, () => ({
        spec: schema_1.schemaSpecs[const_1.HtmlNode.Inline],
        fromMd: { tokenSpec: parser_1.parserTokens[const_1.HtmlNode.Inline] },
        toMd: serializer_1.serializerTokens[const_1.HtmlNode.Inline],
    }));
};
exports.Html = Html;
//# sourceMappingURL=index.js.map
