import { createApp, markRaw } from 'vue'
import '@/assets/css/style.css'
import App from './App.vue'
import router from "./router"
import i18n from './plugins/i18n'
import vuetify from './plugins/vuetify'
import { createPinia } from 'pinia'

// Pinia Use Store
const pinia = createPinia();
pinia.use(({ store }) => {
    store.router = markRaw(router)
});

// Google Login
const script = document.createElement('script');
script.src = 'https://accounts.google.com/gsi/client';
script.async = true;
script.defer = true;
document.head.appendChild(script);

// 加載完成後再掛載 Vue
script.onload = () => {
    createApp(App).use(router).use(i18n).use(vuetify).use(pinia).mount('#app')
};

