
export function addToCart({ commit }, product) {
    let p = Object.keys(product);
    if (!p.includes('subscriptionType')) {
        product['subscriptionType'] = 0;
    }
    return new Promise((resolve) => {
        commit('add', product);
        resolve();

    });
}
export function removeFromCart({ commit }, index) {
    return new Promise((resolve) => {
        commit('remove', index);
        resolve();
    });
}
export function updateItemPrice({ commit }, item) {
    return new Promise((resolve) => {
        commit('update', item);
        resolve();
    });
}

export function clearCart({ commit }) {
    return new Promise((resolve) => {
        commit('clear');
        resolve();
    });
}
