import Vue from 'vue'
import vuetify from 'vuetify'
// @ts-ignore
import VueTelInputVuetify from 'vue-tel-input-vuetify/lib'
import { NuxtAppOptions } from '@nuxt/types/app'

// -- vue-tel-input-vuetify --
// @see https://github.com/yogakurniawan/vue-tel-input-vuetify
export default ({ app } : { app: NuxtAppOptions }) => {
  Vue.use(VueTelInputVuetify, {
    vuetify,
    preferredCountries: ['FR', 'DE', 'CH', 'BE', 'GB'],
    defaultCountry: 'FR',
    mode: 'international',
    invalidMsg: app.i18n.t('phoneNumberInvalid')
  })
}
