'use strict';

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

var _immutable = require('immutable');

var _immutable2 = _interopRequireDefault(_immutable);

var _recordPage = require('../actions/recordPage');

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

exports.default = (state = _immutable2.default.Map(), action) => {
  switch (action.type) {
    case _recordPage.SET_RECORD_PAGE_PRIMARY_CSID:
      return state.set('primaryCsid', _immutable2.default.fromJS(action.payload));
    default:
      return state;
  }
};

const getPrimaryCsid = exports.getPrimaryCsid = state => state.get('primaryCsid');