/*
 * @Author: Mm
 * @Date: 2025-05-07 17:00:20
 * @LastEditors: Mm
 * @LastEditTime: 2025-05-07 17:00:42
 * 不写bug的程序员不是一个好程序员!
 */
import * as Vuex from 'vuex';

export default Vuex.createStore({
  state: {
    nodeMap: new Map(),
    isEdit: null,
    loginUser: JSON.parse(localStorage.getItem('loginUser') || '{}'),
    selectedNode: {},
    selectFormItem: null,
    design: {},
  },
  mutations: {
    selectedNode(state, val) {
      state.selectedNode = val;
    },
    loadForm(state, val) {
      state.design = val;
    },
    setIsEdit(state, val) {
      state.isEdit = val;
    },
  },
  getters: {},
  actions: {},
  modules: {},
});
