import "@/styles/main.css";

import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import { createPinia } from "pinia";
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";

// const setVh = () => {
//   const vh = window.innerHeight * 0.01;
//   document.documentElement.style.setProperty("--vh", `${vh}px`);
// };

// window.addEventListener("resize", setVh);
// window.addEventListener("load", setVh);

// setVh();

const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);

const app = createApp(App);

app.use(router);
app.use(pinia);

// imoort element-plus
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
app.use(ElementPlus);

//import axios
import axios from "axios";
import VueAxios from "vue-axios";
app.use(VueAxios, axios);

app.provide("axios", app.config.globalProperties.axios);

app.mount("#app");
