import { defineComponent as p, computed as f, watchEffect as d, resolveComponent as n, openBlock as _, createElementBlock as v, createVNode as o, createElementVNode as c } from "vue";
import { useRouter as g } from "vue-router";
import { useCoreStore as x } from "@feedmepos/mf-common";
import { u as S } from "./useNavigationMenu-C1H2mTfQ.js";
import { u as y } from "./feature-Cz6F0_cm.js";
const C = { class: "flex flex-col items-center w-full h-full gap-24" }, V = /* @__PURE__ */ p({
  __name: "DefaultView",
  setup(F) {
    const t = x(), a = y(), u = g(), { firstAccessibleRouteName: l } = S(), m = f(
      () => !!t.sessionUser.value && !!t.currentBusiness.value && a.isLoaded
    );
    return d(() => {
      if (!m.value) return;
      const e = l.value;
      e && u.replace({ name: e });
    }), (e, r) => {
      const s = n("FmSpacer"), i = n("FmCircularProgress");
      return _(), v("div", C, [
        o(s),
        c("div", null, [
          o(i, { size: "xl" })
        ]),
        r[0] || (r[0] = c("div", { class: "fm-typo-en-body-lg-400 text-fm-color-typo-secondary pl-8" }, "Loading page...", -1)),
        o(s)
      ]);
    };
  }
});
export {
  V as default
};
