import { queenApi } from "queenjs";
import { Provider } from "queenjs/adapter/vue";
import { createApp, defineComponent } from "vue";
import { Router } from "vue-router";
import "./styles";
import zh_cn from "ant-design-vue/es/locale/zh_CN";
let setModuleHooks: any[] = [];
const App = defineComponent(() => {
setModuleHooks.forEach((hook) => hook());
setModuleHooks = [];
return () => (
);
});
export function startApp(
router: Router,
hooks: any[] = [],
callback?: (app: ReturnType) => void
) {
setModuleHooks = hooks;
queenApi.router = router;
const app = createApp(App);
callback?.(app);
app.use(router).mount("#app");
}