import { ActionTree , MutationTree } from 'vuex' ; import { AppState , ThemePayload } from '@/types/interfaces' ; const appState = { theme : 0 , pageId : 0 , } ; const mutations = { UPDATE_THEME ( state , payload ) { state . pageId = payload . theme ; } , } ; const actions = { updateTheme ( { commit } , payload ) { commit ( 'UPDATE_THEME' , payload ) ; } , } ; export default { state : appState , mutations , actions , } ;