import { shopeeSetting } from '@/plugins/setting';

export const mutations = {
  SET_SHOPEE_FLASHSALE_LIST(state, { typeSet, listSet }) {
    state.listFlashsale[typeSet] = listSet;
  },
  SET_SHOPEE_FLASHSALE_CAMPAIGN(state, listCampaign) {
    state.listCampaign = listCampaign;
  },
  SET_SHOPEE_FLASHSALE_SCHEDULER_LOG(state, log) {
    state.schedulerJob.log = log;
  },
  SET_SHOPEE_FLASHSALE_CAMPAIGN_LOG(state, log) {
    state.campaignJob.log = log;
  },
  SET_SHOPEE_FLASHSALE_SCHEDULER_RUNNING(state, running) {
    state.schedulerJob.running = running;
  },
  SET_SHOPEE_FLASHSALE_CAMPAIGN_RUNNING(state, running) {
    state.campaignJob.running = running;
  },
  SET_SHOPEE_FLASHSALE_SCHEDULER_AUTO(state, auto) {
    state.schedulerJob.auto = auto;
    shopeeSetting.shopeeFlashsaleSchedulerAuto.set(auto);
  },
  SET_SHOPEE_FLASHSALE_CAMPAIGN_AUTO(state, auto) {
    state.campaignJob.auto = auto;
    shopeeSetting.shopeeFlashsaleCampaignAuto.set(auto);
  },
};
