"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.DEFAULT_HTML_RUNTIME_CONFIG = void 0;
exports.useYfmHtmlBlockRuntime = useYfmHtmlBlockRuntime;
const utils_1 = require("@diplodoc/html-extension/utils");
/**
 * Default runtime config with shadow mode disabled for XSS protection.
 */
exports.DEFAULT_HTML_RUNTIME_CONFIG = {
    disabledModes: ['shadow'],
};
/** @internal */
function useYfmHtmlBlockRuntime(meta, runtime = '_assets/html-extension.js', htmlRuntimeConfig = exports.DEFAULT_HTML_RUNTIME_CONFIG) {
    if (meta?.script?.includes(runtime)) {
        // MAJOR: update html-extension peer on ^2.7.1 and remove optional chain
        (0, utils_1.setupRuntimeConfig)?.(htmlRuntimeConfig);
        import(/* webpackChunkName: "yfm-html-runtime" */ '@diplodoc/html-extension/runtime');
    }
}
//# sourceMappingURL=useYfmHtmlBlockRuntime.js.map
