import { defineComponent as c, useSlots as f, computed as g, createBlock as y, openBlock as k, resolveDynamicComponent as C, mergeProps as S, createSlots as $, withCtx as n, renderSlot as s, renderList as D, normalizeProps as v, guardReactiveProps as L } from "vue";
import M from "./ClassicLayout.vue.js";
import a from "./ModernLayout.vue.js";
const b = /* @__PURE__ */ c({
  __name: "Layouts",
  props: {
    configuration: {},
    parsedSpec: {},
    rawSpec: {},
    isDark: { type: Boolean }
  },
  emits: ["toggleDarkMode", "updateContent"],
  setup(l) {
    const p = l, m = f(), i = g(
      () => Object.keys(m).filter(
        (e) => e !== "document-selector"
      )
    ), u = {
      modern: a,
      classic: M
    };
    return (e, o) => (k(), y(C(u[e.configuration.layout ?? "modern"] ?? a), S(p, {
      onToggleDarkMode: o[0] || (o[0] = (t) => e.$emit("toggleDarkMode")),
      onUpdateContent: o[1] || (o[1] = (t) => e.$emit("updateContent", t))
    }), $({
      "document-selector": n(() => [
        s(e.$slots, "document-selector")
      ]),
      _: 2
    }, [
      D(i.value, (t, r) => ({
        name: r,
        fn: n((d) => [
          s(e.$slots, r, v(L(d || {})))
        ])
      }))
    ]), 1040));
  }
});
export {
  b as default
};
