import storage from "../../utils/storage";
export default {
  namespaced: true,
  state: {
    language: storage.get("language") || "cn",
  },
  mutations: {
    SET_LANG(state, lang) {
      state.language = lang;
      storage.set("language", lang);
    },
  },
  actions: {
    setLanguage({ commit }, data) {
      commit("SET_LANG", data);
    },
  },
};
