// fmea表格，头部的按钮
const fmeaTableTopBtns = [
  {
    label: 'FMEA表格',
    icon: 'iconbiaogeshu',
    active: false,
    action: 'toFmeaTable'
  },
  {
    label: '边界图',
    icon: 'iconobject-group',
    active: false,
    action: 'toTopology'
  },
  {
    label: '结构树',
    icon: 'iconjiegoushu',
    active: false,
    action: 'toFmeaTree'
  }
]

const state = {
  fmeaTableTopBtns: fmeaTableTopBtns // fmeaTable，头部的按钮
}

const mutations = {
  SET: (state, { key, value }) => {
    if (state.hasOwnProperty(key)) {
      state[key] = value
    }
  }
}

const actions = {
  set({ commit }, data) {
    commit('SET', data)
  }
}

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