import Vue from 'vue'
import Vuex from 'vuex'
// import homeModule from './modules/home.js'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    imageLists: [],
    auditModel: {},
    userAndDepartment: {
      allIds: [],
      userIds: [],
      departmentIds: [],
      allUserIdWithName: [],
      allUserInfos: [],
      allDepartmentInfos: [],
      allInfos: []
    },
    BASE_API: '',
    count: 1
  },
  mutations: {
    increment (state) {
      state.count++
    },
    updateImageLists(state, lists) {
      state.imageLists = lists
    },
    updateAuditModel(state, obj) {
      state.auditModel = obj
    },
    updateUserAndDepartment(state, obj) {
      state.userAndDepartment = obj
    }
    // modules: {
    //   homeModule
    // },
  }
})
