export const state = () => ({
  keywords: {
    fetching: false,
    data: []
  },
  enterprise: {
    fetching: false,
    data: []
  }
})

export const mutations = {
  REQUEST_KEYWORDS (state) {
    state.keywords.fetching = true
  },
  REST_KEYWORDS (state) {
    state.keywords.data = []
  },
  GET_KEYWORDS_SUCCESS (state, result) {
    state.keywords.fetching = false
    state.keywords.data = result
  },
  GET_KEYWORDS_FAILURE (state) {
    state.keywords.fetching = true
  },
  REQUEST_ENTERPRISE (state) {
    state.enterprise.fetching = true
  },
  REST_ENTERPRISE (state) {
    state.enterprise.data = []
  },
  GET_ENTERPRISE_SUCCESS (state, result) {
    state.enterprise.fetching = false
    state.enterprise.data = result
  },
  GET_ENTERPRISE_FAILURE (state) {
    state.enterprise.fetching = true
  }
}
