{"version":3,"file":"store.cjs","sources":["../../../../../src/components/lib/redux/store.ts"],"sourcesContent":["/* Core */\nimport {\n  configureStore,\n  type EnhancedStore,\n  type ConfigureStoreOptions,\n  type ThunkAction,\n  type Action,\n} from '@reduxjs/toolkit'\nimport type { ThunkDispatch, UnknownAction } from '@reduxjs/toolkit'\nimport {\n  useSelector as useReduxSelector,\n  useDispatch as useReduxDispatch,\n  type TypedUseSelectorHook,\n} from 'react-redux'\n\n/* Instruments */\nimport { reducer } from './rootReducer'\nimport { middleware } from './middleware'\n\nconst configreStoreDefaultOptions: ConfigureStoreOptions = { reducer }\n\nexport const makeReduxStore = (\n  options: ConfigureStoreOptions = configreStoreDefaultOptions\n): EnhancedStore => {\n  const store = configureStore(options)\n\n  return store\n}\n\nexport const reduxStore: EnhancedStore = configureStore({\n  reducer,\n  middleware: (getDefaultMiddleware) => {\n    return getDefaultMiddleware().concat(middleware)\n  },\n})\n\n/* Types */\nexport type ReduxStore = typeof reduxStore\nexport type ReduxState = ReturnType<typeof reduxStore.getState>\nexport type ReduxDispatch = ThunkDispatch<ReduxState, unknown, UnknownAction>\nexport type ReduxThunkAction<ReturnType = void> = ThunkAction<\n  ReturnType,\n  ReduxState,\n  unknown,\n  Action\n>\n\nexport const useDispatch = (): ReduxDispatch => useReduxDispatch<ReduxDispatch>()\nexport const useSelector: TypedUseSelectorHook<ReduxState> = useReduxSelector\n"],"names":["configreStoreDefaultOptions","reducer","reduxStore","configureStore","middleware","getDefaultMiddleware","concat","useSelector","useReduxSelector","options","arguments","length","undefined","useReduxDispatch","useDispatch"],"mappings":"4LAmBMA,EAAqD,CAAEC,QAAAA,EAAAA,SAUhDC,EAA4BC,EAAAA,eAAe,CACtDF,QAAAA,EAAOA,QACPG,WAAY,SAACC,GACX,OAAOA,IAAuBC,OAAOF,EAAAA,WACvC,IAeWG,EAAgDC,EAAAA,mCA3B/B,WAEX,IADjBC,EAAiCC,UAAAC,OAAA,QAAAC,IAAAF,UAAA,GAAAA,UAAA,GAAAV,EAIjC,OAFcG,iBAAeM,EAG/B,2CAoB2B,WAAH,OAAwBI,EAAgBC,aAAiB"}