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