// store.ts
import { configureStore } from '@reduxjs/toolkit';
import { setupListeners } from '@reduxjs/toolkit/query';
import { storeSwitchToDashboard } from '../services/storeSwitchToDashboard';

export const store = configureStore({
  reducer: {
    [storeSwitchToDashboard.reducerPath]: storeSwitchToDashboard.reducer,
  },
  middleware: (getDefaultMiddleware) =>
    getDefaultMiddleware().concat(storeSwitchToDashboard.middleware),
});

setupListeners(store.dispatch);

export default store;