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