export default {
  state: {
    imageList: [],
    currentIndex: 1
  },
  mutations: {
    setImageList(state, imageList) {
      state.imageList = [...imageList];
    },
    setImageIndex(state, index) {
      state.currentIndex = index;
    }
  },
  actions: {
    setImageList({ commit }, data) {
      commit('setImageList', data);
    },
    setImageIndex({ commit }, data) {
      commit(setImageIndex, data);
    },
  },
};
