import { ESHOP_SET_CW_INFO, ESHOP_SET_CART_SALES_CW_ID } from '@/store/utils/types'
import { ESHOP_CW_INFO, ESHOP_CART_SALES_CW_ID } from '@/store/utils/localStorageKeys'

export default {
  [ESHOP_SET_CW_INFO](state, details) {
    state.cwInfo = details
    localStorage.setItem(ESHOP_CW_INFO, JSON.stringify(details))
  },
  [ESHOP_SET_CART_SALES_CW_ID](state, cwId) {
    state.cartSalesCwId = cwId
    localStorage.setItem(ESHOP_CART_SALES_CW_ID, JSON.stringify(cwId))
  },
}
