import { routerRedux } from 'dva/router';
import * as importService from '../services/import';

export default {

  namespace: 'import',
  state: {
  },

  subscriptions: {
    setup({ dispatch, history }) {  // eslint-disable-line

    },
  },

  effects: {
    *getImportConfig ({ payload,onComplete }, { call, put }) {
      const ret = yield call(importService.getImportConfig, payload);
      if (typeof onComplete === 'function') {
        onComplete(ret)
      }
    },
  },

  reducers: {
    save(state, action) {
      return { ...state, ...action.payload };
    },
  },

};
