import PrimeVue from 'primevue/config'
import Aura from '@primeuix/themes/aura'
import ToastService from 'primevue/toastservice'
import ConfirmationService from 'primevue/confirmationservice'
import Tooltip from 'primevue/tooltip'
import StyleClass from 'primevue/styleclass'
import Button from 'primevue/button'
import InputText from 'primevue/inputtext'
import Password from 'primevue/password'
import Message from 'primevue/message'
import Badge from 'primevue/badge'
import Avatar from 'primevue/avatar'
import Tag from 'primevue/tag'

export { default as App } from './App.vue'
export { default as router } from './router/index.js'

export { default as LoginPage } from './pages/auth/LoginPage.vue'
export { default as DashboardPage } from './pages/dashboard/DashboardPage.vue'
export { default as NotFound } from './pages/pages/NotFound.vue'
export { default as Oops } from './pages/pages/Oops.vue'
export { default as AccessDenied } from './pages/pages/AccessDenied.vue'

export { default as AppLayout } from './layout/AppLayout.vue'
export { default as AuthLayout } from './layout/AuthLayout.vue'

export { useAuth } from './composables/useAuth.js'
export { useLayout } from './composables/layout/layout.js'
export { usePermissions } from './composables/usePermissions.js'
export { useNavigation } from './composables/useNavigation.js'

export function installMaestro(app) {
    app.use(PrimeVue, {
        theme: {
            preset: Aura,
            options: {
                darkModeSelector: '.app-dark',
            },
        },
    })
    app.use(ToastService)
    app.use(ConfirmationService)
    app.directive('tooltip', Tooltip)
    app.directive('styleclass', StyleClass)
    app.component('Button', Button)
    app.component('InputText', InputText)
    app.component('Password', Password)
    app.component('Message', Message)
    app.component('Badge', Badge)
    app.component('Avatar', Avatar)
    app.component('Tag', Tag)
}
