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