import LibraryUtils from '../../Utils/LibraryUtils';
import createListingSaga from './listingSaga';
import createSagaMiddleware from 'redux-saga';
import { logger } from 'redux-logger';
import { applyMiddleware, createStore, } from 'redux';
import reducer from './reducer';
var ReduxLoggingParamKey = 'debug-enabled-redux-logging';
var clientConfig = {
    debug: true,
};
var configureListingStore = function (dependencies) {
    var sagaMiddleware = createSagaMiddleware();
    var middleware = [
        sagaMiddleware,
    ];
    if (LibraryUtils.doesSearchParamEqual(ReduxLoggingParamKey, 'true') ||
        clientConfig.debug === true) {
        middleware.push(logger);
    }
    var store = createStore(reducer, applyMiddleware.apply(void 0, middleware));
    sagaMiddleware.run(createListingSaga(dependencies));
    return store;
};
export default configureListingStore;
//# sourceMappingURL=configureListingStore.js.map