import { createVuetify } from 'vuetify'
import 'vuetify/styles'
import { aliases, fa } from 'vuetify/iconsets/fa'
import { mdi } from 'vuetify/iconsets/mdi'
import '@fortawesome/fontawesome-free/css/all.css'
import '@mdi/font/css/materialdesignicons.css'
import {fr} from 'vuetify/locale'
import { lightTheme, darkTheme } from '~/config/theme'

export default defineNuxtPlugin(nuxtApp => {
    const vuetify = createVuetify({
        ssr: true,
        locale: {
            locale: 'fr',
            messages: { fr }
        },
        theme: {
            defaultTheme: 'light',
            themes: {
                light: lightTheme,
                dark: darkTheme
            },
        },
        icons: {
            defaultSet: 'fa',
            aliases,
            sets: {
                fa,
                mdi
            }
        },
    })
    nuxtApp.vueApp.use(vuetify)
})
