"use strict";

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

exports.__esModule = true;
exports.SocialMediaIcon = void 0;

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

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

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

var _Icons = require("../../../Common/Icons");

var _templateObject, _templateObject2;

var SocialMediaIcon = function SocialMediaIcon(_ref) {
  var url = _ref.url,
      media = _ref.media;

  var getIcon = function getIcon() {
    return /*#__PURE__*/_react["default"].createElement(SocialLogo, null, media === 'facebook' && /*#__PURE__*/_react["default"].createElement(_Icons.IconFacebook, null), media === 'instagram' && /*#__PURE__*/_react["default"].createElement(_Icons.IconInstagram, null), media === 'youtube' && /*#__PURE__*/_react["default"].createElement(_Icons.IconYoutube, null), media === 'twitter' && /*#__PURE__*/_react["default"].createElement(_Icons.IconTwitter, null));
  };

  return /*#__PURE__*/_react["default"].createElement(SocialMenuItem, {
    className: "px-2"
  }, url && /*#__PURE__*/_react["default"].createElement("a", {
    href: url,
    target: "_blank",
    rel: "noreferrer"
  }, getIcon()), !url && getIcon());
};

exports.SocialMediaIcon = SocialMediaIcon;

var SocialMenuItem = _styledComponents["default"].li(_templateObject || (_templateObject = (0, _taggedTemplateLiteralLoose2["default"])(["\n  line-height: 1.4;\n  display: inline-block;\n"])));

var SocialLogo = _styledComponents["default"].span(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteralLoose2["default"])(["\n  transition: color 0.15s ease;\n  width: 25px;\n  height: 25px;\n  color: ", ";\n\n  &:hover {\n    cursor: pointer;\n    color: ", ";\n  }\n"])), function (_ref2) {
  var theme = _ref2.theme;
  return theme.palette.grey;
}, function (_ref3) {
  var theme = _ref3.theme;
  return theme.palette.secondary;
});
//# sourceMappingURL=index.js.map