"use strict";

var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

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

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));

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

var React = _interopRequireWildcard(require("react"));

var _styledComponents = _interopRequireDefault(require("styled-components"));

var _injectE2E = _interopRequireDefault(require("../../Tools/injectE2E"));

//  strict
var Wrapper =
/*#__PURE__*/
_styledComponents.default.a.attrs({
  'data-e2e': _injectE2E.default
}).withConfig({
  componentId: "sc-1r996ns-0"
})(["\n  font-family: ", ";\n  font-weight: ", ";\n  font-size: ", ";\n  text-transform: ", ";\n  font-style: ", ";\n  color: ", ";\n  opacity: ", ";\n  cursor: pointer;\n  text-decoration: none;\n\n  &:hover {\n    color: ", ";\n    text-decoration: none;\n  }\n"], function (props) {
  return props.theme['fontPrimary'];
}, function (props) {
  return props.weight;
}, function (props) {
  return props.size;
}, function (props) {
  return props.uppercase ? 'uppercase' : props.capitalize ? 'capitalize' : 'none';
}, function (props) {
  return props.italic ? 'italic' : 'normal';
}, function (props) {
  return props.theme['linkColor'];
}, function (props) {
  return props.opacity;
}, function (props) {
  return props.theme['linkHoverColor'];
});

var Link = function Link(_ref) {
  var children = _ref.children,
      rest = (0, _objectWithoutProperties2.default)(_ref, ["children"]);
  return React.createElement(Wrapper, rest, children);
};

Link.propTypes = process.env.NODE_ENV !== "production" ? {
  capitalize: _propTypes.default.bool,
  children: _propTypes.default.node,
  e2e: _propTypes.default.string,
  italic: _propTypes.default.bool,
  opacity: _propTypes.default.number,
  size: _propTypes.default.string,
  uppercase: _propTypes.default.bool,
  weight: _propTypes.default.oneOf([100, 200, 300, 400, 500, 600, 700])
} : {};
Link.defaultProps = {
  capitalize: false,
  e2e: 'defaultLink',
  italic: false,
  opacity: 1,
  size: '1rem',
  uppercase: false,
  weight: 400
};
var _default = Link;
exports.default = _default;