"use strict";

exports.__esModule = true;
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _propTypes = _interopRequireDefault(require("prop-types"));
var _novaIcons = require("@coorpacademy/nova-icons");
var _style = _interopRequireDefault(require("./style.css"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
const ICONS = {
  mail: _novaIcons.NovaCompositionCoorpacademyMail,
  'google-plus': _novaIcons.NovaCompositionCoorpacademyGooglePlus,
  facebook: _novaIcons.NovaCompositionCoorpacademyFacebook,
  twitter: _novaIcons.NovaCompositionCoorpacademyTwitter,
  linkedin: _novaIcons.NovaCompositionCoorpacademyLinkedin,
  instagram: _novaIcons.NovaCompositionCoorpacademyInstagram,
  youtube: _novaIcons.NovaCompositionCoorpacademyYoutube,
  vimeo: _novaIcons.NovaCompositionCoorpacademyVimeo,
  pinterest: _novaIcons.NovaCompositionCoorpacademyPinterest
};
const themeStyle = {
  default: _style.default.link,
  footer: _style.default.linkFooter
};
const SocialLink = props => {
  const {
    type,
    link,
    mode = 'default',
    'aria-label': ariaLabel
  } = props;
  const IconType = ICONS[type];
  return /*#__PURE__*/_react.default.createElement("a", {
    href: link,
    className: themeStyle[mode],
    target: "_blank",
    rel: "noopener noreferrer",
    "aria-label": ariaLabel,
    "data-name": `${mode}-${type}`
  }, /*#__PURE__*/_react.default.createElement(IconType, {
    className: _style.default.icon
  }));
};
SocialLink.propTypes = process.env.NODE_ENV !== "production" ? {
  mode: _propTypes.default.string,
  type: _propTypes.default.string.isRequired,
  link: _propTypes.default.string.isRequired,
  'aria-label': _propTypes.default.string
} : {};
var _default = exports.default = SocialLink;
//# sourceMappingURL=index.js.map