"use strict";
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")),
  _reducers = _interopRequireDefault(require("./../model/reducers"));

function _interopRequireDefault(e) {
  return e && e.__esModule ? e : {
    default: e
  }
}

function _typeof(e) {
  return (_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(e) {
    return typeof e
  } : function(e) {
    return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e
  })(e)
}
var store = (0, _redux.createStore)(_reducers.default);
exports.store = store;
var configureStoreWithDev = function(e) {
  var r = ("object" === ("undefined" == typeof window ? "undefined" : _typeof(window)) && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ ? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__({}) : _redux.compose)((0, _redux.applyMiddleware)(_reduxThunk.default, (0, _promiseMiddleware.default)({
    promiseTypeSuffixes: ["PENDING", "SUCCESS", "ERROR"]
  }), (0, _amosFetchMiddleware.default)(), (0, _reduxLogger.default)()));
  return (0, _redux.createStore)(_reducers.default, e, r)
};
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)
}
