import { _ as _extends } from '../extends-C4cduGrv.js';
import { _ as _objectWithoutProperties } from '../objectWithoutProperties-TXwlfNxG.js';
import React__default from 'react';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import PropTypes from 'prop-types';
import { icons } from './icons.js';
import './library.js';
import '@fortawesome/fontawesome-svg-core';
import '@fortawesome/pro-solid-svg-icons';
import '@fortawesome/pro-light-svg-icons';
import '@fortawesome/free-brands-svg-icons';

var _excluded = ["icon"];
var lookupSocialIcon = function lookupSocialIcon(icon) {
  return icons.find(function (i) {
    return i.iconName === icon;
  });
};

var Icon = function Icon(_ref) {
  var icon = _ref.icon,
      props = _objectWithoutProperties(_ref, _excluded);

  if (icon && typeof icon == "string") {
    icon = lookupSocialIcon(icon);
  }

  return /*#__PURE__*/React__default.createElement(FontAwesomeIcon, _extends({
    icon: icon
  }, props));
};

Icon.propTypes = {
  icon: PropTypes.oneOfType([PropTypes.object, PropTypes.string])
};

export { Icon as default, lookupSocialIcon };
