import { defineComponent as u, openBlock as d, createElementBlock as _, createElementVNode as f, createVNode as e, unref as t, withCtx as r, createTextVNode as a, createBlock as y, createCommentVNode as h } from "vue";
import { ScalarMarkdown as B } from "@scalar/components";
import o from "./Parameters.vue.js";
import q from "./RequestBody.vue.js";
import { useOperation as k } from "../../../hooks/useOperation.js";
import { useResponses as P } from "../../../hooks/useResponses.js";
const v = { class: "endpoint-details" }, w = { class: "endpoint-description" }, b = /* @__PURE__ */ u({
  __name: "EndpointDetails",
  props: {
    operation: {}
  },
  setup(l) {
    const n = l, { parameterMap: s } = k(n), { responses: c } = P(n.operation);
    return (p, C) => {
      var i, m;
      return d(), _("div", v, [
        f("div", w, [
          e(t(B), {
            value: p.operation.description,
            withImages: ""
          }, null, 8, ["value"])
        ]),
        e(o, {
          parameters: t(s).path
        }, {
          title: r(() => [
            a("Path Parameters")
          ]),
          _: 1
        }, 8, ["parameters"]),
        e(o, {
          parameters: t(s).query
        }, {
          title: r(() => [
            a("Query Parameters")
          ]),
          _: 1
        }, 8, ["parameters"]),
        e(o, {
          parameters: t(s).header
        }, {
          title: r(() => [
            a("Headers")
          ]),
          _: 1
        }, 8, ["parameters"]),
        e(o, {
          parameters: t(s).body,
          showChildren: ""
        }, {
          title: r(() => [
            a("Body Parameters")
          ]),
          _: 1
        }, 8, ["parameters"]),
        e(o, {
          parameters: t(s).formData
        }, {
          title: r(() => [
            a("Form Data")
          ]),
          _: 1
        }, 8, ["parameters"]),
        (i = p.operation.information) != null && i.requestBody ? (d(), y(q, {
          key: 0,
          requestBody: (m = p.operation.information) == null ? void 0 : m.requestBody
        }, {
          title: r(() => [
            a("Body")
          ]),
          _: 1
        }, 8, ["requestBody"])) : h("", !0),
        e(o, { parameters: t(c) }, {
          title: r(() => [
            a("Responses")
          ]),
          _: 1
        }, 8, ["parameters"])
      ]);
    };
  }
});
export {
  b as default
};
