import merge from 'lodash/merge';
import { ActionContext, ActionTree, GetterTree, MutationTree } from 'vuex';

interface State {
  data: any,
}

export const state: State = {
  data: null,
};

export const getters: GetterTree<State, State> = {
  data(state) {
    return state.data;
  },
};

export const mutations: MutationTree<State> = {
  setData(state, value) {
    state.data = merge(state.data, value);
  },
};

export const actions: ActionTree<State, State> = {

};
