import { defineComponent as d, computed as s, createElementBlock as u, createCommentVNode as v, openBlock as n, Fragment as g, renderList as E, createBlock as c, unref as _, withCtx as x, resolveDynamicComponent as C, mergeProps as h } from "vue";
import { ScalarErrorBoundary as k } from "@scalar/components";
import { usePluginManager as y } from "../../plugins/hooks/usePluginManager.js";
const B = {
  key: 0,
  class: "text-base"
}, j = /* @__PURE__ */ d({
  __name: "SpecificationExtension",
  props: {
    value: {}
  },
  setup(m) {
    const { getSpecificationExtensions: i } = y();
    function l(e) {
      return Object.keys(e ?? {}).filter(
        (t) => t.startsWith("x-")
      );
    }
    function p(e) {
      return e.flatMap((t) => i(t)).filter((t) => t.component);
    }
    const f = s(() => l(m.value)), r = s(
      () => p(f.value)
    );
    return (e, t) => typeof e.value == "object" && r.value.length ? (n(), u("div", B, [
      (n(!0), u(g, null, E(r.value, (o) => (n(), c(_(k), null, {
        default: x(() => {
          var a;
          return [
            (n(), c(C(o.component), h({ ref_for: !0 }, { [o.name]: (a = e.value) == null ? void 0 : a[o.name] }), null, 16))
          ];
        }),
        _: 2
      }, 1024))), 256))
    ])) : v("", !0);
  }
});
export {
  j as default
};
