import { defineComponent as c, computed as g, openBlock as n, createBlock as m, unref as e, withCtx as a, withDirectives as C, createVNode as t, createTextVNode as d, toDisplayString as S, createCommentVNode as v, vShow as h } from "vue";
import { ScalarMarkdown as w } from "@scalar/components";
import N from "../../ScreenReader.vue.js";
import { useConfig as _ } from "../../../hooks/useConfig.js";
import { useNavState as k } from "../../../hooks/useNavState.js";
import y from "./OperationsList.vue.js";
import I from "../../Section/Section.vue.js";
import T from "../../Section/SectionHeader.vue.js";
import B from "../../Anchor/Anchor.vue.js";
import L from "../../Section/SectionHeaderTag.vue.js";
import V from "../../Section/SectionContent.vue.js";
import b from "../../Section/SectionColumns.vue.js";
import p from "../../Section/SectionColumn.vue.js";
import D from "../../SpecificationExtension/SpecificationExtension.vue.js";
const K = /* @__PURE__ */ c({
  __name: "Tag",
  props: {
    id: {},
    tag: {},
    collection: {},
    headerId: {},
    isCollapsed: { type: Boolean }
  },
  setup(s) {
    const l = s, { getTagId: u } = k(), i = _(), f = g(() => l.tag["x-displayName"] ?? l.tag.name);
    return (o, r) => (n(), m(e(I), {
      id: o.id,
      label: o.tag.name.toUpperCase(),
      role: "none"
    }, {
      default: a(() => [
        C(t(e(T), null, {
          default: a(() => [
            t(e(B), {
              id: e(u)(o.tag)
            }, {
              default: a(() => [
                t(e(L), {
                  id: o.headerId,
                  level: 2
                }, {
                  default: a(() => [
                    d(S(f.value) + " ", 1),
                    o.isCollapsed ? (n(), m(N, { key: 0 }, {
                      default: a(() => r[0] || (r[0] = [
                        d(" (Collapsed)")
                      ])),
                      _: 1
                    })) : v("", !0)
                  ]),
                  _: 1
                }, 8, ["id"])
              ]),
              _: 1
            }, 8, ["id"])
          ]),
          _: 1
        }, 512), [
          [h, !e(i).isLoading]
        ]),
        t(e(V), {
          loading: e(i).isLoading
        }, {
          default: a(() => [
            t(e(b), null, {
              default: a(() => [
                t(e(p), null, {
                  default: a(() => [
                    t(e(w), {
                      clamp: o.isCollapsed ? "7" : !1,
                      value: o.tag.description,
                      withImages: ""
                    }, null, 8, ["clamp", "value"])
                  ]),
                  _: 1
                }),
                t(e(p), null, {
                  default: a(() => [
                    t(y, {
                      collection: o.collection,
                      tag: o.tag
                    }, null, 8, ["collection", "tag"])
                  ]),
                  _: 1
                })
              ]),
              _: 1
            })
          ]),
          _: 1
        }, 8, ["loading"]),
        t(e(D), { value: o.tag }, null, 8, ["value"])
      ]),
      _: 1
    }, 8, ["id", "label"]));
  }
});
export {
  K as default
};
