import { defineComponent as u, computed as f, createBlock as m, createCommentVNode as C, openBlock as o, unref as a, withCtx as t, createVNode as r, createTextVNode as p, toDisplayString as g, createElementVNode as k, createElementBlock as y, Fragment as N, renderList as _ } from "vue";
import O from "../../ScreenReader.vue.js";
import B from "./OperationsListItem.vue.js";
import V from "../../Card/Card.vue.js";
import L from "../../Card/CardHeader.vue.js";
import b from "../../Card/CardContent.vue.js";
const h = ["aria-label"], F = /* @__PURE__ */ u({
  __name: "OperationsList",
  props: {
    tag: {},
    collection: {},
    isCollapsed: { type: Boolean }
  },
  setup(c) {
    const l = c, n = f(() => l.tag["x-displayName"] ?? l.tag.name);
    return (e, s) => {
      var i;
      return ((i = e.tag.operations) == null ? void 0 : i.length) > 0 ? (o(), m(a(V), {
        key: 0,
        class: "scalar-card-sticky"
      }, {
        default: t(() => [
          r(a(L), { muted: "" }, {
            default: t(() => [
              r(O, null, {
                default: t(() => [
                  p(g(n.value), 1)
                ]),
                _: 1
              }),
              s[0] || (s[0] = p(" Operations "))
            ]),
            _: 1
          }),
          r(a(b), {
            class: "custom-scroll",
            muted: ""
          }, {
            default: t(() => [
              k("ul", {
                "aria-label": `${n.value} endpoints`,
                class: "endpoints"
              }, [
                (o(!0), y(N, null, _(e.tag.operations, (d) => (o(), m(B, {
                  key: d.id,
                  collection: e.collection,
                  isCollapsed: e.isCollapsed,
                  transformedOperation: d
                }, null, 8, ["collection", "isCollapsed", "transformedOperation"]))), 128))
              ], 8, h)
            ]),
            _: 1
          })
        ]),
        _: 1
      })) : C("", !0);
    };
  }
});
export {
  F as default
};
