"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: !0
}), exports.default = configureStore, exports.configureStoreWithDev = exports.store = void 0;

var _redux = require("redux"), _reduxThunk = _interopRequireDefault(require("redux-thunk")), _reduxLogger = _interopRequireDefault(require("redux-logger")), _promiseMiddleware = _interopRequireDefault(require("amos-processor/lib/middleware/promiseMiddleware")), _amosFetchMiddleware = _interopRequireDefault(require("amos-processor/lib/middleware/amosFetchMiddleware")), _storeCreator = require("amos-processor/lib/redux/storeCreator"), _reducers = _interopRequireDefault(require("./../model/reducers")), store = (0, 
_storeCreator.simpleStore)(_reducers.default);

exports.store = store;

var configureStoreWithDev = function(e) {
  return (0, _storeCreator.smartStore)(_reducers.default, e, [ (0, _promiseMiddleware.default)({
    promiseTypeSuffixes: [ "PENDING", "SUCCESS", "ERROR" ]
  }), (0, _amosFetchMiddleware.default)() ], (function(e) {}));
};

exports.configureStoreWithDev = configureStoreWithDev;

var createStoreWithMiddleware = (0, _redux.applyMiddleware)(_reduxThunk.default, (0, 
_promiseMiddleware.default)({
  promiseTypeSuffixes: [ "PENDING", "SUCCESS", "ERROR" ]
}), (0, _amosFetchMiddleware.default)(), (0, _reduxLogger.default)())(_redux.createStore);

function configureStore(e) {
  return createStoreWithMiddleware(_reducers.default, e);
}