/*
Reducer used in the admin functionality.

@copyright (c) Copyright 2017 Dorian Pula
@license AGPL v3
@author Dorian Pula [dorian.pula@amber-penguin-software.ca]
*/

import * as actions from './actions';


export function adminStateReducer(state = {showPanel: false}, action) {
  switch (action.type) {
  case actions.TOGGLE_CONTROL_PANEL:
    return {showPanel: !state.showPanel};
  default:
    return state;
  }
}
