import VButton from './src/components/VButton.vue';
import VInput from './src/components/VInput.vue';
import VSelect from './src/components/VSelect.vue';
import {Quasar} from 'quasar';
import quasarUserOptions from './src/quasar-user-options';

function install(app) {
  app.use(Quasar, quasarUserOptions)
  app.component(VButton.name, VButton);
  app.component(VInput.name, VInput);
  app.component(VSelect.name, VSelect);
  console.log(app)
  app.config.globalProperties.$q.iconMapFn = (iconName) => {
    // iconName is the content of QIcon "name" prop

    // your custom approach, the following
    // is just an example:
    if (iconName.startsWith('app:') === true) {
      // we strip the "app:" part
      const name = iconName.substring(4)

      return {
        cls: 'astra-icons',
        content: name
      }
    }
  }
}

export {
  install
}