import * as types from '../mutation-types'

// initial state
const state = {
    user: null
}

// getters
const getters = {

}

// actions
const actions = {
    // getAllProducts ({ commit }) {
    //     shop.getProducts(products => {
    //         commit(types.RECEIVE_PRODUCTS, { products })
    //     })
    // }
}

// mutations
const mutations = {
    [types.SET_USER] (state, user) {
        state.user = user;
    },
    //
    // [types.ADD_TO_CART] (state, { id }) {
    //     state.all.find(p => p.id === id).inventory--
    // }
}

export default {
    state,
    getters,
    actions,
    mutations
}
