'use strict';

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.isPending = isPending;
exports.getResponse = getResponse;

var _logout = require('../actions/logout');

exports.default = (state = {}, action) => {
  switch (action.type) {
    case _logout.LOGOUT_STARTED:
      return Object.assign({}, state, {
        isPending: true,
        response: null
      });
    case _logout.LOGOUT_FULFILLED:
      return Object.assign({}, state, {
        isPending: false,
        response: action.payload
      });
    default:
      return state;
  }
};

function isPending(state) {
  return state.isPending;
}

function getResponse(state) {
  return state.response;
}