// import REST from 'vuejs/api/rest-axios' // import JSONAPI from 'vuejs/api/json-axios' // import qs from 'querystring-es3' export default { namespaced: true, // initial state state: { pagetitle: null, hamburgerMenuToggle: document.querySelector('input#header-block-right-toggle'), coolLightBoxItems: null, coolLightBoxIndex: null }, // getters getters: {}, // mutations mutations: { setPagetitle (state, title) { console.log('Common, setPagetitle', title) state.pagetitle = title }, setHamMenuState (state, s) { state.hamburgerMenuToggle.checked = s }, setcoolLightBoxItems (state, items) { state.coolLightBoxItems = items }, setcoolLightBoxIndex (state, i) { state.coolLightBoxIndex = i } }, // actions actions: { openCloseHamMenu ({ dispatch, commit, state }, s) { console.log('openCloseHamMenu', s) commit('setHamMenuState', s) }, setcoolLightBoxIndex ({ dispatch, commit, state }, i) { console.log('setcoolLightBoxIndex', i) commit('setcoolLightBoxIndex', i) }, setcoolLightBoxItems ({ dispatch, commit, state }, items) { console.log('setcoolLightBoxItems', items) commit('setcoolLightBoxItems', items) } } }