import type { App } from 'vue'
import PrimeVue from 'primevue/config'
import type { UiProvider } from '../../provider/UiProvider'
import { installUiAdapter } from '../useUiAdapter'
import { primeVueUiAdapter } from './index'
import './adapter.css'

export const primeVueUiProvider: UiProvider = {
  id: 'primevue-aggrid',
  install(app: App): void {
    app.use(PrimeVue, { unstyled: true })
    installUiAdapter(app, primeVueUiAdapter)
  }
}

export function installPrimeVueAdapter(app: App): void {
  primeVueUiProvider.install(app)
}
