import Vue from 'vue';
import EvaIcons from 'vue-eva-icons';
import App from './App.vue';
import router from './router';
import store from './store';

Vue.use(EvaIcons);

Vue.config.productionTip = false;

Vue.filter('toCurrency', (value) => {
  if (typeof value !== 'number') {
    return value;
  }
  const formatter = new Intl.NumberFormat('en-US', {
    minimumFractionDigits: 2,
  });
  return `R ${formatter.format(value)}`;
});

new Vue({
  render: h => h(App),
  router,
  store,
}).$mount('#app');
