/* eslint-disable */
import { combineReducers } from "redux";
import { configureStore } from '@reduxjs/toolkit';
import roomReducer from '../store/roomSlice';
import peersReducer from '../store/peersSlice';
import participantReducer from '../store/participantSlice';
import pluginReducer from '../store/pluginSlice';
import consumersReducer from '../store/consumersSlice';
import producersReducer from '../store/producerSlice';
const middlewares = [
/* other middlewares */
];
// if (DYTE_DEV_MODE) {
//     const createDebugger = require("redux-flipper").default;
//     middlewares.push(createDebugger());
// }
export const resetEverything = () => ({
    type: "end_meeting"
});
const appReducers = combineReducers({
    room: roomReducer,
    peers: peersReducer,
    participant: participantReducer,
    plugin: pluginReducer,
    consumers: consumersReducer,
    producers: producersReducer,
});
const rootReducer = (state, action) => {
    if (action.type === 'end_meeting') { // check for action type 
        state = undefined;
    }
    return appReducers(state, action);
};
export const store = configureStore({
    reducer: rootReducer,
    middleware: (getDefaultMiddleware) => {
        return getDefaultMiddleware().concat(middlewares);
    },
    devTools: true
});
//# sourceMappingURL=store.js.map