const state = {
  basicInfo: {},
  structureCanEdit: false,
  paperStructureInfo: [],
  groupInfo: [],
  openMarkClass: false,
  openDoubleMarking: false,
  classInfo: [],
  objectiveStructure: [],
};

const mutations = {
  setBasicInfo(state, basicInfo) {
    state.basicInfo = basicInfo;
  },
  setPaperStructureInfo(state, paperStructureInfo) {
    state.paperStructureInfo = paperStructureInfo;
  },
  setStructureCanEdit(state, structureCanEdit) {
    state.structureCanEdit = structureCanEdit;
  },
  setGroupInfo(state, groupInfo) {
    state.groupInfo = groupInfo;
  },
  setOpenMarkClass(state, openMarkClass) {
    state.openMarkClass = openMarkClass;
  },
  setOpenDoubleMarking(state, openDoubleMarking) {
    state.openDoubleMarking = openDoubleMarking;
  },
  setClassInfo(state, classInfo) {
    state.classInfo = classInfo;
  },
  setObjectiveAnswerInfo(state, objectiveAnswerInfo) {
    state.objectiveAnswerInfo = objectiveAnswerInfo;
  },
  initStore(state) {
    state.basicInfo = {};
    state.structureCanEdit = false;
    state.paperStructureInfo = [];
    state.groupInfo = [];
    state.openMarkClass = false;
    state.classInfo = [];
    state.objectiveStructure = [];
  },
};

export default {
  namespaced: true,
  state,
  mutations,
};
