import { defineComponent, computed, createElementBlock, openBlock, normalizeClass, unref } from 'vue';
import '../../../utils/index.mjs';
import purify from '../../../../node_modules/.pnpm/dompurify@3.3.0/node_modules/dompurify/dist/purify.es.mjs';
import { htmlProps } from './html.mjs';
import { createNamespace } from '../../../utils/create-namespace.mjs';

"use strict";
const _hoisted_1 = ["innerHTML"];
var _sfc_main = /* @__PURE__ */ defineComponent({
  ...{
    name: "LlHtml"
  },
  __name: "html",
  props: htmlProps,
  setup(__props) {
    const props = __props;
    const bem = createNamespace("html");
    const purifyOptions = computed(() => ({
      USE_PROFILES: { html: true, svg: true },
      ADD_TAGS: ["use", "svg", "symbol"],
      ADD_ATTR: ["xlink:href", "viewBox", "aria-hidden"],
      FORBID_TAGS: ["script", "iframe", "object", "embed"],
      FORBID_ATTR: ["onerror", "onload", "onclick", "onmouseover"],
      ...props.options
    }));
    const purifiedVal = computed(() => {
      return purify.sanitize(props.value, purifyOptions.value);
    });
    return (_ctx, _cache) => {
      return openBlock(), createElementBlock("span", {
        class: normalizeClass(unref(bem).b()),
        innerHTML: purifiedVal.value
      }, null, 10, _hoisted_1);
    };
  }
});

export { _sfc_main as default };
//# sourceMappingURL=html.vue2.mjs.map
