"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 _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));

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 _Icons = require("../../Atoms/Icons");

var _Link = _interopRequireDefault(require("../../Atoms/Links/Link"));

var _interpolation = require("../../Tools/interpolation");

var Wrapper =
/*#__PURE__*/
(0, _styledComponents.default)(_Link.default).withConfig({
  componentId: "sc-1chygni-0"
})(["\n  display: flex;\n  flex-direction: row;\n  justify-content: center;\n  align-items: center;\n  height: ", ";\n  width: ", ";\n  border-radius: 50%;\n  background-color: ", ";\n  transition: all 0.5s;\n\n  &:hover {\n    background-color: ", ";\n  }\n"], (0, _interpolation.prop)('size'), (0, _interpolation.prop)('size'), (0, _interpolation.theme)('circleBadgeBackgroundColor'), (0, _interpolation.theme)('circleBadgeHoverColor'));
var WhiteFacebook =
/*#__PURE__*/
(0, _styledComponents.default)(_Icons.FabFacebookF).withConfig({
  componentId: "sc-1chygni-1"
})(["\n  fill: ", ";\n  max-height: 60%;\n  max-width: 60%;\n\n  &:hover {\n    fill: ", ";\n  }\n"], (0, _interpolation.theme)('circleBadgeColor'), (0, _interpolation.theme)('circleBadgeColor'));
var WhiteLinkedin =
/*#__PURE__*/
(0, _styledComponents.default)(_Icons.FabLinkedinIn).withConfig({
  componentId: "sc-1chygni-2"
})(["\n  fill: ", ";\n  max-height: 60%;\n  max-width: 60%;\n\n  &:hover {\n    fill: ", ";\n  }\n"], (0, _interpolation.theme)('circleBadgeColor'), (0, _interpolation.theme)('circleBadgeColor'));
var WhiteTwitter =
/*#__PURE__*/
(0, _styledComponents.default)(_Icons.FabTwitter).withConfig({
  componentId: "sc-1chygni-3"
})(["\n  fill: ", ";\n  max-height: 60%;\n  max-width: 60%;\n\n  &:hover {\n    fill: ", ";\n  }\n"], (0, _interpolation.theme)('circleBadgeColor'), (0, _interpolation.theme)('circleBadgeColor'));

var CircleBadge = function CircleBadge(_ref) {
  var name = _ref.name,
      size = _ref.size,
      rest = (0, _objectWithoutProperties2.default)(_ref, ["name", "size"]);
  return React.createElement(Wrapper, (0, _extends2.default)({
    size: size
  }, rest), name === 'facebook' && React.createElement(WhiteFacebook, {
    selectable: true,
    size: size
  }), name === 'linkedin' && React.createElement(WhiteLinkedin, {
    selectable: true,
    size: size
  }), name === 'twitter' && React.createElement(WhiteTwitter, {
    selectable: true,
    size: size
  }));
};

CircleBadge.propTypes = process.env.NODE_ENV !== "production" ? {
  name: _propTypes.default.oneOf(['facebook', 'linkedin', 'twitter']),
  size: _propTypes.default.string
} : {};
CircleBadge.defaultProps = {
  name: 'facebook',
  size: '2.625rem'
};
var _default = CircleBadge;
exports.default = _default;