import { defineComponent as C, computed as b, createBlock as r, openBlock as s, unref as e, createSlots as k, withCtx as a, createElementVNode as t, createVNode as i, createCommentVNode as m, withModifiers as O, toDisplayString as f, normalizeClass as g, createTextVNode as S } from "vue";
import { ScalarIcon as _, ScalarIconButton as B, ScalarMarkdown as R } from "@scalar/components";
import { useClipboard as w } from "@scalar/use-hooks/useClipboard";
import I from "../../../components/OperationPath.vue.js";
import { useConfig as N } from "../../../hooks/useConfig.js";
import { isOperationDeprecated as T, getOperationStability as h, getOperationStabilityColor as V } from "../../../libs/operation.js";
import $ from "../components/OperationParameters.vue.js";
import q from "../components/OperationResponses.vue.js";
import E from "../../../components/Section/SectionAccordion.vue.js";
import z from "../../ExampleResponses/ExampleResponses.vue.js";
import A from "../../ExampleRequest/ExampleRequest.vue.js";
import D from "../../TestRequestButton/TestRequestButton.vue.js";
import L from "../../../components/HttpMethod/HttpMethod.vue.js";
import M from "../../../components/Anchor/Anchor.vue.js";
import P from "../../../components/Badge/Badge.vue.js";
const U = { class: "operation-title" }, j = { class: "operation-details" }, F = { class: "endpoint-label" }, G = { class: "endpoint-label-path" }, H = { class: "endpoint-label-name" }, J = { class: "endpoint-content" }, K = { class: "operation-details-card" }, Q = { class: "operation-details-card-item" }, W = { class: "operation-details-card-item" }, fo = /* @__PURE__ */ C({
  __name: "ClassicLayout",
  props: {
    id: {},
    collection: {},
    server: {},
    operation: {},
    transformedOperation: {},
    schemas: {}
  },
  setup(p) {
    const { copyToClipboard: u } = w(), v = N(), y = b(() => p.operation.summary || p.operation.path);
    return (o, l) => {
      var d;
      return s(), r(e(E), {
        id: o.id,
        class: "reference-endpoint",
        transparent: ""
      }, k({
        title: a(() => [
          t("div", U, [
            t("div", j, [
              i(e(L), {
                class: "endpoint-type",
                method: o.operation.method,
                short: ""
              }, null, 8, ["method"]),
              i(e(M), {
                id: o.id ?? "",
                class: "endpoint-anchor"
              }, {
                default: a(() => [
                  t("h3", F, [
                    t("div", G, [
                      i(I, {
                        deprecated: e(T)(o.operation),
                        path: o.operation.path
                      }, null, 8, ["deprecated", "path"])
                    ]),
                    t("div", H, f(y.value), 1),
                    e(h)(o.operation) ? (s(), r(e(P), {
                      key: 0,
                      class: g(e(V)(o.operation))
                    }, {
                      default: a(() => [
                        S(f(e(h)(o.operation)), 1)
                      ]),
                      _: 1
                    }, 8, ["class"])) : m("", !0)
                  ])
                ]),
                _: 1
              }, 8, ["id"])
            ])
          ])
        ]),
        actions: a(({ active: n }) => {
          var c;
          return [
            n ? (s(), r(e(D), {
              key: 0,
              operation: o.operation
            }, null, 8, ["operation"])) : (c = e(v)) != null && c.hideTestRequestButton ? m("", !0) : (s(), r(e(_), {
              key: 1,
              class: "endpoint-try-hint",
              icon: "Play",
              thickness: "1.75px"
            })),
            i(e(B), {
              class: "endpoint-copy",
              icon: "Clipboard",
              label: "Copy endpoint URL",
              size: "xs",
              variant: "ghost",
              onClick: l[0] || (l[0] = O((X) => e(u)(o.operation.path), ["stop"]))
            })
          ];
        }),
        default: a(() => [
          t("div", J, [
            t("div", K, [
              t("div", Q, [
                i($, {
                  operation: o.operation,
                  schemas: o.schemas
                }, null, 8, ["operation", "schemas"])
              ]),
              t("div", W, [
                i(q, {
                  collapsableItems: !1,
                  operation: o.transformedOperation,
                  schemas: o.schemas
                }, null, 8, ["operation", "schemas"])
              ])
            ]),
            i(e(z), {
              responses: o.operation.responses
            }, null, 8, ["responses"]),
            i(e(A), {
              collection: o.collection,
              operation: o.operation,
              server: o.server,
              transformedOperation: o.transformedOperation
            }, null, 8, ["collection", "operation", "server", "transformedOperation"])
          ])
        ]),
        _: 2
      }, [
        (d = o.operation) != null && d.description ? {
          name: "description",
          fn: a(() => {
            var n;
            return [
              i(e(R), {
                value: (n = o.operation) == null ? void 0 : n.description,
                withImages: ""
              }, null, 8, ["value"])
            ];
          }),
          key: "0"
        } : void 0
      ]), 1032, ["id"]);
    };
  }
});
export {
  fo as default
};
