import {Button, Tree} from 'primevue'
import vuetify from './vuetify'
import pinia from '../stores'
import router from '../router'
import PrimeVue from 'primevue/config'
import 'primeicons/primeicons.css'
import Aura from '@primevue/themes/aura'
import 'ucsd-its-frontend/style.css'

import type {App} from 'vue'
import {UcsdPlugin} from "ucsd-its-frontend";
import {ucsdAppConfig} from "../config/ucsd.config";

import {library} from '@fortawesome/fontawesome-svg-core'
import {FontAwesomeIcon} from '@fortawesome/vue-fontawesome'
import {fas} from '@fortawesome/free-solid-svg-icons'
import {far} from '@fortawesome/free-regular-svg-icons'
import ToastPlugin from 'vue-toast-notification';

import 'vue-toast-notification/dist/theme-bootstrap.css';


export function registerPlugins(app: App) {
    library.add(fas) // Include needed solid icons
    library.add(far) // Include needed regular icons
    app
        .use(vuetify)
        .use(router)
        .use(pinia)
        .use(PrimeVue, {
            theme: {
                preset: Aura,
                options: {
                    darkModeSelector: '.my-app-dark',
                },
            },
        })
        .use(ToastPlugin)
        .use(UcsdPlugin, {ucsdAppConfig})
        .component('Button', Button)
        .component('Tree', Tree)
        .component('font-awesome-icon', FontAwesomeIcon)
}