import Vue from 'vue'
import * as filter from './filter'
import { formatDate, getLabel, getSimpleText, hideIdCard, hideName, hidePhone, moneyToBig } from './filter'

Object.keys(filter).forEach(k => Vue.filter(k, filter[k]))

Vue.filter('format', formatDate)
Vue.filter('getLabel', getLabel)
Vue.filter('hidePhone', hidePhone)
Vue.filter('hideName', hideName)
Vue.filter('hideIdCard', hideIdCard)
Vue.filter('moneyToBig', moneyToBig)
Vue.filter('getSimpleText', getSimpleText)

Vue.prototype.$formatDate = Vue.filter('formatDate')
Vue.prototype.$hidePhone = Vue.filter('hidePhone')
Vue.prototype.$label = Vue.filter('getLabel')
