"use strict";

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

var _immutable = _interopRequireDefault(require("immutable"));

var _actionCodes = require("../constants/actionCodes");

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

var _default = (state = _immutable.default.Map(), action) => {
  switch (action.type) {
    case _actionCodes.SET_QUICK_SEARCH_KEYWORD:
      return state.set('keyword', action.payload);

    default:
      return state;
  }
};

exports.default = _default;

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