const state = {
    title: 'Welcome'
}

const getter = {
    pageTitle: state => {
        return state.title
    }
}

const  actions = {
    setPageTitle({commit, state}, title) {
        commit('setTitle', title)

        document.title = state.title
    }
}

const mutations = {
    setTitle(state, title) {
        state.title = title + ' | Portal'
    }
}

export default {
    state, getter, actions, mutations,
}
