/**
 * notification reducer
 */
import * as reducers from "./reducers"
import reducerFromMap from "@racletteCore/lib/reducerFromMap"
import { applicationState } from "@racletteCore/store/state"

const reducerMap = {
  init: () => applicationState.notifications,
  "notifications/add": reducers.notificationsAdd,
  "notifications/clear": reducers.notificationsClear,
  "notifications/markAllAsSeen": reducers.notificationsMarkAllAsSeen,
  "notifications/markAllAsRead": reducers.notificationsMarkAllAsRead,
  "notifications/markAsRead": reducers.notificationsMarkAsRead,
  "notifications/markUnread": reducers.notificationsMarkUnread,
  "notifications/toggle": reducers.notificationsToggle,
  "notifications/update": reducers.notificationsUpdate,
}

export default reducerFromMap(reducerMap)
