'use strict';

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

var _immutable = require('immutable');

var _immutable2 = _interopRequireDefault(_immutable);

var _keywordSearch = require('../actions/keywordSearch');

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

exports.default = function () {
  var state = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : _immutable2.default.Map();
  var action = arguments[1];

  switch (action.type) {
    case _keywordSearch.SET_KEYWORD_SEARCH_KEYWORD:
      return state.set('keyword', action.payload);
    default:
      return state;
  }
};

function getKeyword(state) {
  return state.get('keyword');
}