// store/modules/sopSelectPoints.js
const state = {
  selectSopPoints: [],
  PointTableData: [],
  sopEdit: false,
  sopTitle: '',
  ticketTitle: '',
  sopLook: false,
  MapData:null,
  visibleSopSelect:true,
};

const mutations = {
  setSelectSopPoints(state, points) {
    state.selectSopPoints = points;
  },
  setPointTableData(state, points) {
    state.PointTableData = points;
  },
  setSopEdit(state, points) {
    state.sopEdit = points;
  },
  setSopTitle(state, points) {
    state.sopTitle = points;
  },
  setTicketTitle(state, points) {
    state.ticketTitle = points;
  },
  setSopLook(state, points) {
    state.sopLook = points;
  },
  setMapData(state, points) {
    state.MapData = points;
  },
  setVisibleSopSelect(state, points) {
    state.visibleSopSelect = points;
  }
};

const actions = {
  setSelectSopPoints({ commit }, points) {
    commit('setSelectSopPoints', points);
  },
  setPointTableData({ commit }, points) {
    commit('setPointTableData', points);
  },
  setSopEdit({ commit }, points) {
    commit('setSopEdit', points);
  },
  setSopTitle({ commit }, points) {
    commit('setSopTitle', points);
  },
  setTicketTitle({ commit }, points) {
    commit('setTicketTitle', points);
  },
  setSopLook({ commit }, points) {
    commit('setSopLook', points);
  },
  setMapData({ commit }, points) {
    commit('setMapData', points);
  },
  setVisibleSopSelect({commit},points) {
    commit('setVisibleSopSelect', points);
  }
};

const getters = {
  getSelectSopPoints: state => state.selectSopPoints,
  getPointTableData: state => state.PointTableData,
  getSopEdit: state => state.sopEdit,
  getSopTitle: state => state.sopTitle,
  getTicketTitle: state => state.ticketTitle,
  getSopLook: state => state.sopLook,
  getMapData:state=>state.MapData,
  getVisibleSopSelect:state=>state.visibleSopSelect
};

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