import { defineComponent as b, useId as O, computed as S, createBlock as p, openBlock as m, unref as e, withCtx as a, createVNode as r, createCommentVNode as y, createElementVNode as t, normalizeClass as d, createTextVNode as f, toDisplayString as u } from "vue";
import { ScalarMarkdown as C, ScalarErrorBoundary as c } from "@scalar/components";
import k from "../../../components/OperationPath.vue.js";
import { useConfig as B } from "../../../hooks/useConfig.js";
import { getOperationStability as h, getOperationStabilityColor as _, isOperationDeprecated as E } from "../../../libs/operation.js";
import N from "../components/OperationParameters.vue.js";
import V from "../components/OperationResponses.vue.js";
import w from "../../../components/Section/Section.vue.js";
import I from "../../../components/Section/SectionContent.vue.js";
import R from "../../../components/Badge/Badge.vue.js";
import T from "../../../components/Section/SectionHeader.vue.js";
import q from "../../../components/Anchor/Anchor.vue.js";
import D from "../../../components/Section/SectionHeaderTag.vue.js";
import H from "../../../components/Section/SectionColumns.vue.js";
import g from "../../../components/Section/SectionColumn.vue.js";
import L from "../../ExampleRequest/ExampleRequest.vue.js";
import M from "../../TestRequestButton/TestRequestButton.vue.js";
import $ from "../../ExampleResponses/ExampleResponses.vue.js";
const z = { class: "operation-details" }, A = { class: "examples" }, ie = /* @__PURE__ */ b({
  __name: "ModernLayout",
  props: {
    id: {},
    collection: {},
    server: {},
    operation: {},
    transformedOperation: {},
    schemas: {}
  },
  setup(n) {
    const i = O(), v = B(), l = S(() => n.operation.summary || n.operation.path);
    return (o, P) => (m(), p(e(w), {
      id: o.id,
      "aria-labelledby": e(i),
      label: l.value,
      tabindex: "-1"
    }, {
      default: a(() => [
        r(e(I), {
          loading: e(v).isLoading
        }, {
          default: a(() => [
            e(h)(o.operation) ? (m(), p(e(R), {
              key: 0,
              class: d(e(_)(o.operation))
            }, {
              default: a(() => [
                f(u(e(h)(o.operation)), 1)
              ]),
              _: 1
            }, 8, ["class"])) : y("", !0),
            t("div", {
              class: d(e(E)(o.operation) ? "deprecated" : "")
            }, [
              r(e(T), null, {
                default: a(() => [
                  r(e(q), {
                    id: o.id ?? ""
                  }, {
                    default: a(() => [
                      r(e(D), {
                        id: e(i),
                        level: 3
                      }, {
                        default: a(() => [
                          f(u(l.value), 1)
                        ]),
                        _: 1
                      }, 8, ["id"])
                    ]),
                    _: 1
                  }, 8, ["id"])
                ]),
                _: 1
              })
            ], 2),
            r(e(H), null, {
              default: a(() => [
                r(e(g), null, {
                  default: a(() => [
                    t("div", z, [
                      r(e(C), {
                        value: o.operation.description,
                        withImages: ""
                      }, null, 8, ["value"]),
                      r(N, {
                        operation: o.operation,
                        schemas: o.schemas
                      }, null, 8, ["operation", "schemas"]),
                      r(V, {
                        operation: o.transformedOperation,
                        schemas: o.schemas
                      }, null, 8, ["operation", "schemas"])
                    ])
                  ]),
                  _: 1
                }),
                r(e(g), null, {
                  default: a(() => [
                    t("div", A, [
                      r(e(c), null, {
                        default: a(() => [
                          r(e(L), {
                            collection: o.collection,
                            fallback: "",
                            operation: o.operation,
                            server: o.server,
                            transformedOperation: o.transformedOperation
                          }, {
                            header: a(() => {
                              var s;
                              return [
                                r(k, {
                                  class: "example-path",
                                  deprecated: (s = o.transformedOperation.information) == null ? void 0 : s.deprecated,
                                  path: o.transformedOperation.path
                                }, null, 8, ["deprecated", "path"])
                              ];
                            }),
                            footer: a(() => [
                              r(e(M), { operation: o.operation }, null, 8, ["operation"])
                            ]),
                            _: 1
                          }, 8, ["collection", "operation", "server", "transformedOperation"])
                        ]),
                        _: 1
                      }),
                      r(e(c), null, {
                        default: a(() => [
                          r(e($), {
                            responses: o.operation.responses,
                            style: { "margin-top": "12px" }
                          }, null, 8, ["responses"])
                        ]),
                        _: 1
                      })
                    ])
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })
          ]),
          _: 1
        }, 8, ["loading"])
      ]),
      _: 1
    }, 8, ["id", "aria-labelledby", "label"]));
  }
});
export {
  ie as default
};
