import Plugins from '@/utils/plugins';
import Particles from 'vue-particles';

import Element from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import '@/theme/index.scss';
import CmsLoading from '@/comps/CmsLoading'
import { i18n } from '@/utils/i18ns';
import http from '@/utils/https'
import messageTips from '@/utils/messageTips';
import directive from '@/utils/plugins/directive'
import { globalComponentSize } from '@/utils/componentSize.js';

export const plugins = (Vue) => {
  Vue.use(Plugins);
  Vue.use(Particles);
  Vue.use(Element, { i18n: (key, value) => i18n.t(key, value), size: globalComponentSize });
  directive(Vue);
  window.$bus = Vue.prototype.$bus = Vue.prototype.bus = new Vue();
  Vue.prototype.$messageTips = messageTips;
  Vue.config.productionTip = false;
  Vue.prototype.$loading = CmsLoading;
  Vue.prototype.$http = http;
}