import { createApp } from 'vue';
import { createPinia } from 'pinia';

import './styles/global.css';
import './styles/alerts.less';

import App from './App.vue';
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';

import router from '@/router';
import globalComponents from '@/utils/components';
import AlertPlugin from '@/utils/alert';
import focus from '@/directive/focus';

const app = createApp(App);
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);
app.use(pinia);
app.use(router);
app.use(globalComponents);
app.use(AlertPlugin);
app.directive('focus', focus);

app.mount('#app');
