'use strict';

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _propTypes = require('prop-types');

var _propTypes2 = _interopRequireDefault(_propTypes);

var _immutable = require('immutable');

var _immutable2 = _interopRequireDefault(_immutable);

var _SearchResultLinkContainer = require('../../containers/search/SearchResultLinkContainer');

var _SearchResultLinkContainer2 = _interopRequireDefault(_SearchResultLinkContainer);

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

const propTypes = {
  config: _propTypes2.default.object,
  csid: _propTypes2.default.string,
  searchName: _propTypes2.default.string
};

function CsidLink(props) {
  const config = props.config,
        csid = props.csid,
        searchName = props.searchName;


  const searchDescriptor = _immutable2.default.fromJS({
    recordType: 'all',
    searchQuery: {
      csid,
      p: 0,
      size: 0
    }
  });

  return _react2.default.createElement(_SearchResultLinkContainer2.default, {
    config: config,
    searchDescriptor: searchDescriptor,
    searchName: searchName
  });
}

CsidLink.propTypes = propTypes;