import { configureStore } from '@reduxjs/toolkit';
import themeSlice from './Features/ThemeSlice/themeSlice'
import userDetailSlice from './Features/UserDetails/userDetails'
import cometChatSlice from './Features/CometChatSlice/cometChatSlice'
import userDetailSidebar from './Features/UserDetailSidebar/userDetailSidebar'
import socketDataSlice from './Features/SocketDataSlice/socketDataSlice'
import influencerDataSlice from './Features/InfluencerDataSlice/influencerDataSlice'
import unreadCountSlice from './Features/UnreadCountSlice/unreadCountSlice'

export const makeStore = configureStore({
    reducer: {
        themeSlice,
        userDetailSlice,
        cometChatSlice,
        userDetailSidebar,
        socketDataSlice,
        influencerDataSlice,
        unreadCountSlice
    }
})

// Infer the type of makeStore
export type AppStore = ReturnType<typeof makeStore.getState>
export type AppDispatch = typeof makeStore.dispatch
// Infer the `RootState` and `AppDispatch` types from the store itself
// export type RootState = ReturnType<AppStore['getState']>
// export type AppDispatch = AppStore['dispatch']