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

// map instead of switch statement
const reducerMap = {
  init: () => applicationState.ui,
  projectInit: reducers.projectInit,
  "ui/setCompositionAs": reducers.setCompositionAs,
  "ui/unsetComposition": reducers.unsetComposition,
  "ui/toggle": reducers.uiToggle,
  "ui/update": reducers.uiUpdate,
}

export default reducerFromMap(reducerMap)
