import { defineComponent as q, computed as x, createBlock as a, createCommentVNode as y, openBlock as t, unref as e, withCtx as o, createElementBlock as u, Fragment as v, renderList as k, createVNode as i, createTextVNode as N } from "vue";
import { useNavState as B } from "../../../hooks/useNavState.js";
import H from "../../Section/SectionContainerAccordion.vue.js";
import V from "../../Section/SectionAccordion.vue.js";
import S from "../Schema/SchemaProperty.vue.js";
import j from "../../Anchor/Anchor.vue.js";
import A from "../../Section/SectionHeaderTag.vue.js";
import L from "../Schema/SchemaHeading.vue.js";
import M from "../../Section/SectionHeader.vue.js";
const O = {
  key: 0,
  class: "properties"
}, T = { key: 1 }, J = /* @__PURE__ */ q({
  __name: "ClassicLayout",
  props: {
    schemas: {}
  },
  setup(b) {
    const s = b, C = x(() => s.schemas ? Object.entries(s.schemas).map(([m, n]) => ({
      name: m,
      schema: n
    })) : []), { getModelId: c } = B();
    return (m, n) => s.schemas ? (t(), a(e(H), {
      key: 0,
      class: "reference-models"
    }, {
      title: o(() => [
        i(e(M), { level: 2 }, {
          default: o(() => n[0] || (n[0] = [
            N("Models")
          ])),
          _: 1,
          __: [0]
        })
      ]),
      default: o(() => [
        (t(!0), u(v, null, k(C.value, ({ name: l, schema: r }) => (t(), a(e(V), {
          id: e(c)({ name: l }),
          key: l,
          label: l
        }, {
          title: o(() => [
            i(e(j), {
              id: e(c)({ name: l }),
              class: "reference-models-anchor"
            }, {
              default: o(() => [
                i(e(A), { level: 3 }, {
                  default: o(() => [
                    i(e(L), {
                      class: "reference-models-label",
                      name: r.title ?? l,
                      value: r
                    }, null, 8, ["name", "value"])
                  ]),
                  _: 2
                }, 1024)
              ]),
              _: 2
            }, 1032, ["id"])
          ]),
          default: o(() => [
            r != null && r.properties ? (t(), u("div", O, [
              (t(!0), u(v, null, k(Object.entries(r.properties), ([d, g]) => {
                var f, p, _;
                return t(), a(e(S), {
                  key: d,
                  name: d,
                  required: ((f = r.required) == null ? void 0 : f.includes(d)) || ((_ = (p = r.properties) == null ? void 0 : p[d]) == null ? void 0 : _.required) === !0,
                  value: g
                }, null, 8, ["name", "required", "value"]);
              }), 128))
            ])) : (t(), u("div", T, [
              i(e(S), { value: r }, null, 8, ["value"])
            ]))
          ]),
          _: 2
        }, 1032, ["id", "label"]))), 128))
      ]),
      _: 1
    })) : y("", !0);
  }
});
export {
  J as default
};
