import Vue from "vue";
import Vuex from "vuex";
import createPersistedState from "vuex-persistedstate";
import user from "./modules/user";
import invigilation from "./modules/invigilation";

Vue.use(Vuex);

export default new Vuex.Store({
  plugins: [createPersistedState({ storage: window.sessionStorage })],
  modules: {
    user,
    invigilation,
  },
  state: {
    isFullScreen: false,
    schoolLogo: "",
  },
  mutations: {
    setIsFullScreen(state, isFullScreen) {
      state.isFullScreen = isFullScreen;
    },
    setSchoolLogo(state, schoolLogo) {
      state.schoolLogo = schoolLogo;
    },
  },
  actions: {},
});
