import { combineReducers } from "redux";
import { persistReducer } from "redux-persist";
import storage from "redux-persist/lib/storage";
import applicationReducer from "./application/application.reducer";
import userReducer from "./user/user.reducer";
import reportingReducer from "./reporting/reporting.reducer";
import scanReducer from './scan/scan.reducer'

const persistConfig = {
  key: "root",
  storage,
  blacklist: ["application", "user", "reporting", "scan"],
};

const rootReducer = combineReducers({
  application: applicationReducer,
  user: userReducer,
  reporting: reportingReducer,
  scan: scanReducer
});

export default persistReducer(persistConfig, rootReducer);
