import * as T from '../../utils/types'
import _ from 'lodash'

export default {
  [T.SET_EFORM_LINK](state, payload) {
    state.eFormLink = payload
  },

  [T.SET_EFORM_LINK_BY_KEY_ID](state, payload) {
    state.eFormLinkByKeyId = _.merge(state.eFormLinkBykeyId, _.groupBy(payload, 'key_id'))
  },
}
