import { createApp } from "vue";
import App from "./App.vue";
import router from "@/router";
import pinia from "./stores";
// 导入全局样式
import "@/styles/style.css";
import permission from "./directives/permission";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import "element-plus/theme-chalk/dark/css-vars.css"; // 引入暗色主题样式
import { useThemeStore } from "./stores/theme";
import "./styles/theme.css";

const app = createApp(App);
app.use(router);
app.use(pinia);
app.use(permission);
app.use(ElementPlus);

// 初始化主题
const themeStore = useThemeStore();
themeStore.initTheme();

app.mount("#app");
