import { createApp } from "vue";
import App from "./App.vue";
import router from "@/router";
import { setupStore } from "@/store";
import { setupDirective } from "@/directive";

import "@/permission";

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

// 国际化
import i18n from "@/lang/index";

// 样式
import "element-plus/theme-chalk/dark/css-vars.css";
import "@/styles/index.scss";
import "uno.css";
import "@/styles/my.scss"; // 引入自己定义的样式
// import 'amfe-flexible';
import ElementPlus from "element-plus";
// 引入组件
import myLoading from "@/components/myLoading.vue";
import myLoadingIcon from "@/components/myLoadingIcon.vue";
import VueCropper from 'vue-cropper'; 
import 'vue-cropper/dist/index.css'

const app = createApp(App);
// 全局注册 自定义指令(directive)
setupDirective(app);
// 全局注册 状态管理(store)
setupStore(app);
// element

app.use(ElementPlus);

app.use(router).use(i18n).use(VueCropper).mount("#app");
// 注册全局组件   .component('VueCropper',VueCropper)
app.component('myLoading',myLoading).component('myLoadingIcon',myLoadingIcon)