import * as appService from '../services/chartPage'

export default {
  namespace: 'chartPage',
  state: {
    btnEntities: []
  },
  effects: {
    *getChartPageConfigInfo ({ payload }, { call }) {
      return yield call(appService.getChartPageConfigInfo, payload)
    },
    *getChartData ({ payload, url }, { call }) {
      return yield call(appService.getChartData, { payload, url })
    }
  },
  reducers: {
    save (state, action) {
      return { ...state, ...action.payload }
    }
  }
}
