import { defineComponent as u, computed as f, createBlock as s, createCommentVNode as h, openBlock as r, unref as o, withCtx as t, createVNode as n, createTextVNode as d, toDisplayString as c, createElementVNode as g, createElementBlock as k, Fragment as _, renderList as C } from "vue";
import { ScalarCard as S, ScalarCardHeader as b, ScalarCardSection as N } from "@scalar/components";
import V from "../ScreenReader.vue.js";
import y from "./OperationsListItem.vue.js";
const B = ["aria-label"], O = /* @__PURE__ */ u({
  __name: "OperationsList",
  props: {
    tag: {}
  },
  setup(m) {
    const p = f(
      () => {
        var e;
        return (e = m.tag.children) == null ? void 0 : e.filter(
          (a) => "operation" in a || "webhook" in a
        );
      }
    );
    return (e, a) => {
      var l;
      return ((l = e.tag.children) == null ? void 0 : l.length) > 0 ? (r(), s(o(S), {
        key: 0,
        class: "endpoints-card"
      }, {
        default: t(() => [
          n(o(b), { muted: "" }, {
            default: t(() => [
              n(V, null, {
                default: t(() => [
                  d(c(e.tag.title), 1)
                ]),
                _: 1
              }),
              d(" " + c(e.tag.isWebhooks ? "Webhooks" : "Operations"), 1)
            ]),
            _: 1
          }),
          n(o(N), { class: "custom-scroll max-h-[60vh]" }, {
            default: t(() => [
              g("ul", {
                "aria-label": `${e.tag.title} endpoints`,
                class: "endpoints"
              }, [
                (r(!0), k(_, null, C(p.value, (i) => (r(), s(y, {
                  key: i.id,
                  operation: i
                }, null, 8, ["operation"]))), 128))
              ], 8, B)
            ]),
            _: 1
          })
        ]),
        _: 1
      })) : h("", !0);
    };
  }
});
export {
  O as default
};
