import { getCurrentInstance as a, createVNode as p, render as R, onMounted as h, onUnmounted as g, computed as C } from "vue";
import { createRouter as l, createWebHistory as m } from "vue-router";
import { useStore as c, createNamespacedHelpers as u, mapMutations as x, mapActions as E, mapState as V, mapGetters as A } from "vuex";
function I() {
  return a();
}
function v(t, e) {
  return p(t, e);
}
function b(t) {
  const e = v(t.component, t.props);
  t.appContext && (e.appContext = t.appContext), R(e, t.selfContainer), t.parentContainer?.appendChild(t.selfContainer);
}
function S(t) {
  let e;
  h(() => {
    e = t();
  }), g(() => {
    e?.();
  });
}
function T(t) {
  const e = l({
    history: m("/"),
    routes: t,
    // [
    //   {
    //     path: "/",
    //     redirect: "/showcase"
    //   },
    //   {
    //     path: "/",
    //     path: "/demo/:demoid",
    //     name: "home",
    //     component: HomeView,
    //     // router level code-splitting
    //     // this generates a separate chunk (About.[hash].js) for this router
    //     // which is lazy-loaded when the router is visited.
    //     component: () => import("../views/AboutView.vue"),
    //     meta: {},
    //     children: [
    //       { path: "", name: "default", redirect: "/demo/sub1" },
    //       {
    //         path: "sub1",
    //         name: "sub1",
    //         component: () => import("@/src/views/sub1.vue")
    //       }
    //     ]
    //   },
    //   {
    //     path: "/:pathMatch(.*)*",
    //     name: "404",
    //     component: Page404
    //   }
    // ]
    scrollBehavior: (r, o, n) => n || { left: 0, top: 0 }
  });
  return e.beforeEach(
    (r, o, n) => {
      n();
    }
  ), {
    router: e,
    push: async (r) => {
      await e.push(r);
    },
    // {
    //   name: Name;
    //   path: Path;
    //   paramsRaw: ParamsRaw;
    //   params: Params;
    //   meta: Meta;
    // }
    to: function(r) {
      this.push({ path: r });
    },
    // 动态注册路由
    // const remove = addRoute("demo", {
    //   path: "sub2",
    //   name: "sub2",
    //   component: () => import("@/src/views/sub2.vue")
    // });
    // remove();
    addRoute: (r, o) => e.addRoute(r, o),
    removeRoute: (r) => {
      e.removeRoute(r);
    },
    hasRoute: (r) => e.hasRoute(r),
    getRoutes: () => e.getRoutes(),
    getCurrentRoute: () => ({
      params: e.currentRoute.value.params,
      query: e.currentRoute.value.query
    })
  };
}
const _ = "increment", G = "decrement", q = "incrementAction";
function H() {
  return {
    store: c()
    // state: store.state
    // ...useVuexStates(["count"]),
    // ...useVuexStates("demo", ["name"]),
    // ...useVuexGetters({ totaln: "totaln" }),
    // ...useVuexGetters("demo", ["nameFormat"]),
    // ...useVuexMutations({
    //   [INCREMENT]: INCREMENT,
    //   [DECREMENT]: DECREMENT
    // }),
    // ...useVuexMutations("demo", ["changeName"]),
    // ...useVuexActions({
    //   [INCREMENTACTION]: INCREMENTACTION
    // }),
    // ...useVuexActions("demo", ["changeNameAction"])
    // {{ state.count }}
    // {{ state.demo.name }}
    // {{ store.getters.totalCount }}
    // {{ store.getters.totaln(2) }}
    // {{ totaln(3) }}
    // {{ store.getters["demo/nameFormat"] }}
  };
}
function O(t, e) {
  let r = V;
  return typeof t == "string" && t.length > 0 ? r = u(t).mapState : e = t, i(e, r);
}
function j(t, e) {
  let r = A;
  return typeof t == "string" && t.length > 0 ? r = u(t).mapGetters : e = t, i(e, r);
}
function w(t, e) {
  let r = x;
  return typeof t == "string" && t.length > 0 ? r = u(t).mapMutations : e = t, Array.isArray(e), r(e);
}
function B(t, e) {
  let r = E;
  return typeof t == "string" && t.length > 0 ? r = u(t).mapActions : e = t, Array.isArray(e), r(e);
}
function i(t, e) {
  const r = c(), o = {}, n = e(t);
  return Object.keys(n).forEach((s) => {
    const f = n[s].bind({ $store: r });
    o[s] = C(f);
  }), o;
}
export {
  G as DECREMENT,
  _ as INCREMENT,
  q as INCREMENTACTION,
  I as getInstance,
  v as getVNode,
  b as renderComponent,
  S as useVueEffect,
  T as useVueRouter,
  H as useVuex,
  B as useVuexActions,
  j as useVuexGetters,
  w as useVuexMutations,
  O as useVuexStates
};
//# sourceMappingURL=zyzgroup_core_vue.js.map
