'use strict';

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

var _react = require('react');

var _react2 = _interopRequireDefault(_react);

var _csidHelpers = require('../../helpers/csidHelpers');

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

var _SearchResultLinkContainer2 = _interopRequireDefault(_SearchResultLinkContainer);

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

var propTypes = {
  config: _react.PropTypes.object,
  csid: _react.PropTypes.string,
  searchName: _react.PropTypes.string
};

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


  var searchDescriptor = {
    recordType: 'all',
    searchQuery: {
      p: 0,
      size: 0,
      kw: (0, _csidHelpers.asKeywords)(csid)
    }
  };

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

CsidLink.propTypes = propTypes;