import { createApp } from 'vue';
import './assets/tailwind.css'
import './assets/modern.css'
// Import api early to register global axios interceptors
import './services/api';
import App from './App.vue';
import router from './router';
import Notifications from '@kyvg/vue3-notification';
import Pagination from 'v-pagination-3';
import { createPinia } from 'pinia';
import { useThemeStore } from './stores/theme';

const pinia = createPinia()
const app = createApp(App)
app.use(pinia)
app.use(router)
    .component('pagination', Pagination);

// Initialize theme before mounting to prevent flash of default theme
const themeStore = useThemeStore()
themeStore.initTheme()

app.use(Notifications).mount('#app')