"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var redux = require("redux");
var redux_observable_1 = require("redux-observable");
var redux_logger_1 = require("redux-logger");
var _1 = require(".");
exports.rootEpic = redux_observable_1.combineEpics(_1.palette.epics, _1.canvas.epics, _1.input.epics, _1.mode.epics, _1.asset.epics);
exports.rootReducer = redux.combineReducers({
    palette: _1.palette.default,
    canvas: _1.canvas.default,
    input: _1.input.default,
    mode: _1.mode.default,
    asset: _1.asset.default
});
var epicMiddleware = redux_observable_1.createEpicMiddleware();
function createStore() {
    var composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || redux.compose;
    var ignoreLogger = [
        _1.input.actions.mouseMove,
        _1.input.actions.mouseEnter,
        _1.input.actions.mouseLeave,
        _1.input.actions.drag,
        _1.palette.actions.updateSelection
    ];
    var logger = redux_logger_1.createLogger({
        predicate: function (getState, action) { return !ignoreLogger.some(function (ac) { return ac.match(action); }); }
    });
    var store = redux.createStore(exports.rootReducer, composeEnhancers(redux.applyMiddleware(epicMiddleware, logger)));
    epicMiddleware.run(exports.rootEpic);
    return store;
}
exports.default = createStore;
//# sourceMappingURL=createStore.js.map