import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

const store = new Vuex.Store({
  state: {
    activeMenu:{},
    activeSub:{}
  },
  getters: {
    activeMenu:state=>state.activeMenu,
    activeSub:state=>state.activeSub,
  },
  mutations: {
    SetActiveMenu(state, activeMenu) {
      activeMenu['ran'] = Math.random()
      state.activeMenu = activeMenu
    },
    SetActiveSub(state, activeSub) {
      state.activeSub = activeSub
    }
  },
  actions: {

  },
  modules: {

  }
})

export default store