//Louise Scboard 使用
export default {
  namespaced: true,
  state: {
    data: {
      openMapInfo: false,
      openClassroomInfo: false,
      classroomInfo: "",
      //存放更多篩選選單狀態
      morefilterCondition: {
        filterClassroomType: "全部",
        filterClassroomStatus: "全部",
        filterEquip: ["全部"],
        filterUpdate: "全部",
      },
    },
  },
  getters: {
    getOpenClassroomInfo: (state) => {
      return state.data.openClassroomInfo;
    },
    getMapInfo: (state) => {
      return state.data.openMapInfo;
    },
    getClassroomInfo: (state) => {
      return state.data.classroomInfo;
    },
    getMorefilterCondition: (state) => {
      return state.data.morefilterCondition;
    },
  },
  mutations: {
    closeInfo(state) {
      state.data.openClassroomInfo = false;
      state.data.openMapInfo = false;
    },
    setClassroomInfo(state, data) {
      state.data.classroomInfo = data;
      state.data.openMapInfo = true;
      state.data.openClassroomInfo = true;
      console.log(state.data.openClassroomInfo);
    },
    setMorefilterCondition(state, data) {
      state.data.morefilterCondition = {
        filterClassroomType: data.filterClassroomType,
        filterClassroomStatus: data.filterClassroomStatus,
        filterEquip: data.filterEquip,
        filterUpdate: data.filterUpdate,
      };
      //console.log(state.data.morefilterCondition)
    },
  },
  actions: {},
};
