import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router/index.js'
import './style.css'

const app = createApp(App)
app.use(createPinia())
app.use(router)
// Wait for the initial navigation guard (token refresh) to complete before mounting
// so onMounted hooks in App.vue and child components have a valid access token.
await router.isReady()
app.mount('#app')
