import { defineComponent as r, computed as i, createBlock as o, createCommentVNode as l, openBlock as t, unref as s, withCtx as u } from "vue";
import { useNavState as f } from "../../../hooks/useNavState.js";
import { getModels as d } from "../../../libs/openapi.js";
import p from "./ClassicLayout.vue.js";
import h from "./ModernLayout.vue.js";
import y from "../../Lazy/Lazy.vue2.js";
const M = /* @__PURE__ */ r({
  __name: "Models",
  props: {
    document: {},
    config: {}
  },
  setup(n) {
    const { hash: a } = f(), e = i(() => d(n.document));
    return (m, g) => e.value && Object.keys(e.value).length > 0 ? (t(), o(s(y), {
      key: 0,
      id: "models",
      isLazy: !!s(a) && !s(a).startsWith("model")
    }, {
      default: u(() => {
        var c;
        return [
          ((c = m.config) == null ? void 0 : c.layout) === "classic" ? (t(), o(p, {
            key: 0,
            schemas: e.value
          }, null, 8, ["schemas"])) : (t(), o(h, {
            key: 1,
            config: m.config,
            schemas: e.value
          }, null, 8, ["config", "schemas"]))
        ];
      }),
      _: 1
    }, 8, ["isLazy"])) : l("", !0);
  }
});
export {
  M as default
};
