'use strict';Object.defineProperty(exports, "__esModule", { value: true });exports.default =


























function (api, browserHistory) {var forEmbed = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
  var middleware = [
  new _middleware4.default().toMiddleware(),
  new _signerMiddleware2.default(api).toMiddleware(),
  new _middleware2.default().toMiddleware(),
  new _chainMiddleware2.default().toMiddleware()];


  if (!forEmbed) {
    middleware.push(
    new _middleware6.default(api).toMiddleware(),
    new _middleware8.default(api).toMiddleware());

  }

  return middleware.concat(
  browserHistory ?
  (0, _reactRouterRedux.routerMiddleware)(browserHistory) :
  [], _reduxThunk2.default);


};var _reduxThunk = require('redux-thunk');var _reduxThunk2 = _interopRequireDefault(_reduxThunk);var _reactRouterRedux = require('react-router-redux');var _middleware = require('@parity/ui/lib/Errors/middleware');var _middleware2 = _interopRequireDefault(_middleware);var _middleware3 = require('./providers/settings/middleware');var _middleware4 = _interopRequireDefault(_middleware3);var _signerMiddleware = require('./providers/signerMiddleware');var _signerMiddleware2 = _interopRequireDefault(_signerMiddleware);var _middleware5 = require('./providers/certifications/middleware');var _middleware6 = _interopRequireDefault(_middleware5);var _chainMiddleware = require('./providers/chainMiddleware');var _chainMiddleware2 = _interopRequireDefault(_chainMiddleware);var _middleware7 = require('./providers/registry/middleware');var _middleware8 = _interopRequireDefault(_middleware7);function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}