import { configureStore } from '@reduxjs/toolkit'
import chatReducer from '../store/chat/chatSlice'
import mediaDeviceReducer from '../store/mediaDevice/mediaDeviceSlice'
import sessionReducer from '../store/session/sessionSlice'
import transcriptReducer from '../store/transcript/transcriptSlice'
import viewReducer from '../store/view/viewSlice'
import virtualBackgroundReducer from '../store/virtualBackground/virtualBackgroundSlice'
import aiFeatureReducer from '../store/aiFeatures/aiFeatureSlice'

export const zocksStoreConfig = {
  reducer: {
    chat: chatReducer,
    mediaDevice: mediaDeviceReducer,
    session: sessionReducer,
    transcript: transcriptReducer,
    aiFeature: aiFeatureReducer,
    view: viewReducer,
    virtualBackground: virtualBackgroundReducer,
  },
}

const store = configureStore(zocksStoreConfig)

export type AppDispatch = typeof store.dispatch
export type RootState = ReturnType<typeof store.getState>
