import Vue from 'vue'
import App from './App.vue'
import Router from 'vue-router'
import Vuex from 'vuex'
import { routerOptions, modules, i18n, message, bootstrap } from '../index'
// import eventLogPlugin from '@/plugins/EventLogPlugin'
import findParentData from '@vue2-client/plugins/FindParentsData'
import { Modal } from 'ant-design-vue'

import VueDraggableResizable from 'vue-draggable-resizable'
import XScrollBox from '@vue2-client/components/xScrollBox'

Vue.use(Router)
Vue.use(Vuex)
// Vue.use(eventLogPlugin)
Vue.use(findParentData)

// 创建router store
const store = new Vuex.Store({ modules })
const router = new Router(routerOptions)

Vue.config.devtools = true
// 绑定原型
Vue.Modal = Modal
Vue.component('VueDraggableResizable', VueDraggableResizable)
Vue.component('XScrollBox', XScrollBox)

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