"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _react = _interopRequireDefault(require("react"));
var _FIconBase = _interopRequireDefault(require("./FIconBase.cjs"));
var _library = _interopRequireDefault(require("./library.cjs"));
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
/**
 * https://medium.com/@david.gilbertson/icons-as-react-components-de3e33cb8792
 */

var FIcon = _ref => {
  var {
    icon,
    color
  } = _ref;
  if (typeof icon == "string" && icon.length > 0 && Object.keys(_library.default).indexOf(icon) >= 0) return /*#__PURE__*/_react.default.createElement(_FIconBase.default, {
    icon: _library.default[icon],
    color: color
  });
  return icon;
};
var _default = FIcon;
exports.default = _default;