"use strict";

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

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.EnhancedIcon = void 0;

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

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

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

var _ = require(".");

var _Box = require("../Box");

var __jsx = _react["default"].createElement;

var EnhancedIcon = function EnhancedIcon(_ref) {
  var icon = _ref.icon,
      props = (0, _objectWithoutProperties2["default"])(_ref, ["icon"]);

  if (typeof icon === 'string') {
    return __jsx(_.Icon, (0, _extends2["default"])({
      focusable: false,
      name: icon,
      color: "currentColor"
    }, props));
  }

  return __jsx(_Box.Box, (0, _extends2["default"])({
    as: icon,
    "data-custom-icon": true,
    focusable: "false",
    color: "currentColor"
  }, props));
};

exports.EnhancedIcon = EnhancedIcon;
//# sourceMappingURL=custom.js.map