import { createApp } from "vue";
import App from "./App.vue";
import router from "@/router";
import { setupStore } from "@/store";
import { setupDirective } from "@/directive";
import { setupElIcons, setupI18n, setupPermission } from "@/plugins";
import print from "vue3-print-nb";

// 本地SVG图标
import "virtual:svg-icons-register";

// 样式
import "element-plus/theme-chalk/dark/css-vars.css";
import "@/styles/index.scss";
import "uno.css";
import "animate.css";

// avue
import { setupEleAvue } from "@/plugins";
import VueQrcode from "vue-qrcode";

const app = createApp(App);
// 全局注册 自定义指令(directive)
setupDirective(app);
// 全局注册 状态管理(store)
setupStore(app);
// 全局注册Element-plus图标
setupElIcons(app);
// 国际化
setupI18n(app);
// 注册动态路由
setupPermission();

setupEleAvue(app);

console.log(
  "process.env.VUE_APP_BASE_API, 测试提交",
  process.env.VUE_APP_BASE_API
);

app.component("VueQrcode", VueQrcode);

app.use(router).use(print).mount("#app");
