import { logger } from "../../../logger.js";
import { HtmlNode } from "./const.js";
import { parserTokens } from "./parser.js";
import { schemaSpecs } from "./schema.js";
import { serializerTokens } from "./serializer.js";
export { HtmlAttr, HtmlNode } from "./const.js";
export const Html = (builder) => {
    if (builder.context.has('html') && builder.context.get('html') === false) {
        logger.info('[HTML extension]: Skip extension, because HTML disabled via context');
        return;
    }
    builder.addNode(HtmlNode.Block, () => ({
        spec: schemaSpecs[HtmlNode.Block],
        fromMd: { tokenSpec: parserTokens[HtmlNode.Block] },
        toMd: serializerTokens[HtmlNode.Block],
    }));
    builder.addNode(HtmlNode.Inline, () => ({
        spec: schemaSpecs[HtmlNode.Inline],
        fromMd: { tokenSpec: parserTokens[HtmlNode.Inline] },
        toMd: serializerTokens[HtmlNode.Inline],
    }));
};
//# sourceMappingURL=index.js.map
