import router from './router.js';
//import store from './store/index.js';
import { setupErrorBuffer } from './store/error.js'
import {createApp} from 'vue'
import {createPinia} from 'pinia';
import App from './App.vue'

import {
    PhStar,
    PhCalculator,
    PhSealCheck,
    PhCloudArrowUp,
    PhX,
    PhTrain,
    PhTruckTrailer,
    PhBoat,
    PhPencilSimple,
    PhLock,
    PhLockOpen,
    PhWarning,
    PhMagnifyingGlass,
    PhPlus,
    PhUpload,
    PhDownload,
    PhTrash,
    PhArchive,
    PhFloppyDisk,
    PhArrowCounterClockwise,
    PhCheck, PhBug, PhShuffle, PhStack, PhFile
} from "@phosphor-icons/vue";

const app = createApp(App);
const pinia = createPinia();
app.use(pinia);

app.config.globalProperties.backendUrl = 'http://localhost:8080/api/';

app.component('PhPlus', PhPlus);
app.component('PhDownload', PhDownload);
app.component('PhUpload', PhUpload);
app.component('PhMagnifyingGlass', PhMagnifyingGlass);
app.component('PhTrash', PhTrash);
app.component('PhArchive', PhArchive);
app.component('PhFloppyDisk', PhFloppyDisk);
app.component('PhArrowCounterClockwise', PhArrowCounterClockwise );
app.component('PhCheck', PhCheck);
app.component('PhWarning', PhWarning);
app.component('PhLock', PhLock);
app.component('PhLockOpen', PhLockOpen);
app.component('PhTruckTrailer', PhTruckTrailer);
app.component('PhBoat', PhBoat);
app.component('PhTrain', PhTrain);
app.component('PhPencilSimple', PhPencilSimple);
app.component('PhX', PhX);
app.component('PhCloudArrowUp', PhCloudArrowUp);
app.component('PhSealCheck', PhSealCheck);
app.component('PhCalculator', PhCalculator);
app.component('PhStar', PhStar);
app.component('PhBug', PhBug);
app.component('PhShuffle', PhShuffle);
app.component('PhStack', PhStack );
app.component('PhFile', PhFile);

app.use(router);


//app.component('base-button', () => import('./components/UI/BasicButton.vue'));
//app.component('base-badge', () => import('./components/UI/BasicBadge.vue'));
setupErrorBuffer()

app.mount('#app');
