import * as types from '../constants/ActionTypes.js'
import * as filters from '../constants/ShoppingListFilters.js'

const visibilityFilter = (state = filters.SHOW_ALL, action = {}) => {
  switch (action.type) {
    case types.SET_VISIBILITY_FILTER:

      return action.filter

    default:

      return state
  }
}

export default visibilityFilter
