"use strict";

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

var _propTypes = _interopRequireDefault(require("prop-types"));

var _react = _interopRequireDefault(require("react"));

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

var ReviewLink = function ReviewLink(props) {
  var handleClick = function handleClick(event) {
    if (props.onClick) {
      props.onClick(event, props.href);
    }
  };

  return /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("a", {
    href: props.href,
    onClick: handleClick,
    className: props.className,
    "aria-label": props.ariaLabel
  }, props.children));
};

exports.ReviewLink = ReviewLink;
ReviewLink.propTypes = {
  /**
     * Provide this value to give screenreaders longer, more descriptive text to
     * explain the context of the link.
     */
  ariaLabel: _propTypes.default.string,
  className: _propTypes.default.string,
  children: _propTypes.default.node.isRequired,
  href: _propTypes.default.string.isRequired,
  onClick: _propTypes.default.func
};
var _default = ReviewLink;
exports.default = _default;