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