"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.store = exports.history = void 0;
const history_1 = require("history");
const redux_1 = require("redux");
const redux_saga_1 = __importDefault(require("redux-saga"));
const index_1 = __importDefault(require("@/reducers/index"));
const index_2 = __importDefault(require("@/sagas/index"));
const sagaMiddleware = (0, redux_saga_1.default)();
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || redux_1.compose;
const configureStore = ({ preloadedState, }) => {
    const store = (0, redux_1.legacy_createStore)(index_1.default, preloadedState, composeEnhancers((0, redux_1.applyMiddleware)(sagaMiddleware)));
    sagaMiddleware.run(index_2.default);
    return store;
};
exports.history = (0, history_1.createHashHistory)();
exports.store = configureStore({
    preloadedState: {},
});
