import { defineComponent as y, computed as v, openBlock as n, createBlock as p, unref as r, withCtx as o, createVNode as t, createTextVNode as s, createCommentVNode as u, createElementVNode as f, normalizeClass as g, toDisplayString as E } from "vue";
import R from "./CustomRequestExamples.vue.js";
import q from "./EndpointDetails.vue.js";
import c from "./EndpointPath.vue.js";
import B from "./ExampleRequest.vue.js";
import h from "./TestRequestButton.vue.js";
import N from "../../Section/Section.vue.js";
import V from "../../Section/SectionContent.vue.js";
import _ from "../../Section/SectionColumns.vue.js";
import C from "../../Section/SectionColumn.vue.js";
import b from "../../Badge/Badge.vue.js";
import T from "../../Section/SectionHeader.vue.js";
import D from "../../Anchor/Anchor.vue.js";
import H from "./PathResponses/PathResponses.vue.js";
import { useHttpClientStore as P } from "../../../stores/useHttpClientStore.js";
const w = { class: "examples" }, W = /* @__PURE__ */ y({
  __name: "Operation",
  props: {
    id: {},
    operation: {}
  },
  setup(S) {
    const l = S, { availableTargets: k } = P(), m = v(() => {
      var i;
      const e = ["x-custom-examples", "x-codeSamples", "x-code-samples"];
      for (const a of e)
        if ((i = l.operation.information) != null && i[a])
          return l.operation.information[a];
      return null;
    });
    return (e, i) => (n(), p(r(N), {
      id: e.id,
      label: e.operation.name
    }, {
      default: o(() => [
        t(r(V), null, {
          default: o(() => [
            t(r(_), null, {
              default: o(() => [
                t(r(C), null, {
                  default: o(() => {
                    var a, d;
                    return [
                      (a = e.operation.information) != null && a.deprecated ? (n(), p(r(b), { key: 0 }, {
                        default: o(() => [
                          s(" Deprecated ")
                        ]),
                        _: 1
                      })) : u("", !0),
                      f("div", {
                        class: g((d = e.operation.information) != null && d.deprecated ? "deprecated" : "")
                      }, [
                        t(r(T), { level: 3 }, {
                          default: o(() => [
                            t(r(D), {
                              id: e.id ?? ""
                            }, {
                              default: o(() => [
                                s(E(e.operation.name), 1)
                              ]),
                              _: 1
                            }, 8, ["id"])
                          ]),
                          _: 1
                        })
                      ], 2),
                      t(q, { operation: e.operation }, null, 8, ["operation"])
                    ];
                  }),
                  _: 1
                }),
                t(r(C), null, {
                  default: o(() => [
                    f("div", w, [
                      m.value ? (n(), p(R, {
                        key: 0,
                        examples: m.value,
                        operation: e.operation
                      }, {
                        header: o(() => {
                          var a;
                          return [
                            t(c, {
                              class: "example-path",
                              deprecated: (a = e.operation.information) == null ? void 0 : a.deprecated,
                              path: e.operation.path
                            }, null, 8, ["deprecated", "path"])
                          ];
                        }),
                        footer: o(() => [
                          t(h, { operation: e.operation }, null, 8, ["operation"])
                        ]),
                        _: 1
                      }, 8, ["examples", "operation"])) : r(k).length ? (n(), p(B, {
                        key: 1,
                        operation: e.operation
                      }, {
                        header: o(() => {
                          var a;
                          return [
                            t(c, {
                              class: "example-path",
                              deprecated: (a = e.operation.information) == null ? void 0 : a.deprecated,
                              path: e.operation.path
                            }, null, 8, ["deprecated", "path"])
                          ];
                        }),
                        footer: o(() => [
                          t(h, { operation: e.operation }, null, 8, ["operation"])
                        ]),
                        _: 1
                      }, 8, ["operation"])) : u("", !0),
                      t(r(H), {
                        operation: e.operation,
                        style: { "margin-top": "12px" }
                      }, null, 8, ["operation"])
                    ])
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })
          ]),
          _: 1
        })
      ]),
      _: 1
    }, 8, ["id", "label"]));
  }
});
export {
  W as default
};
