import {createReducer} from 'redux-starter-kit';
import {displayConfiguration, setAutoMountProcessed, setBusy} from '../actions/mount_actions';

export const mountReducer = createReducer({
  AutoMountProcessed: false,
  DisplayConfiguration: null,
  MountsBusy: false,
}, {
  [displayConfiguration]: (state, action) => {
    return {...state, DisplayConfiguration: action.payload};
  },
  [setAutoMountProcessed]: (state, action) => {
    return {...state, AutoMountProcessed: action.payload};
  },
  [setBusy]: (state, action) => {
    return {...state, MountsBusy: action.payload};
  }
});