import { defineComponent, createElementBlock, createCommentVNode, openBlock, createElementVNode, Fragment, renderList, createBlock, unref } from "vue";
import { getResolvedRef } from "@scalar/workspace-store/helpers/get-resolved-ref";
import ParameterListItem from "./ParameterListItem.vue.js";
const _hoisted_1 = {
  key: 0,
  class: "mt-6"
};
const _hoisted_2 = {
  "aria-label": "Responses",
  class: "mb-3 list-none p-0 text-sm"
};
const _sfc_main = /* @__PURE__ */ defineComponent({
  __name: "OperationResponses",
  props: {
    responses: {},
    breadcrumb: {},
    collapsableItems: { type: Boolean },
    eventBus: {},
    options: {}
  },
  setup(__props) {
    return (_ctx, _cache) => {
      return Object.keys(_ctx.responses ?? {}).length ? (openBlock(), createElementBlock("div", _hoisted_1, [
        _cache[0] || (_cache[0] = createElementVNode("div", { class: "text-c-1 mt-3 mb-3 leading-[1.45] font-medium" }, "Responses", -1)),
        createElementVNode("ul", _hoisted_2, [
          (openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.responses, (response, status) => {
            return openBlock(), createBlock(ParameterListItem, {
              key: status,
              breadcrumb: _ctx.breadcrumb,
              collapsableItems: _ctx.collapsableItems,
              eventBus: _ctx.eventBus,
              name: status,
              options: _ctx.options,
              parameter: unref(getResolvedRef)(response)
            }, null, 8, ["breadcrumb", "collapsableItems", "eventBus", "name", "options", "parameter"]);
          }), 128))
        ])
      ])) : createCommentVNode("", true);
    };
  }
});
export {
  _sfc_main as default
};
