import Vue from 'vue'
import Vuex from 'vuex'
import moduleDefault from './module_default'

Vue.use(Vuex)

const moduleTest = {
  state: {
    testName: 'Testing 123'
  },
  mutations: {
    setTestName (state, payload) {
      state.testName = payload
    }
  },
  getters: {
    getTestName: (state) => () => {
      return state.testName
    }
  }
}

const store = new Vuex.Store({
  modules: {
    default: moduleDefault,
    test: moduleTest
  }
})

export default store
