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