"use strict";

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

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

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

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

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

var _reactIconBase = _interopRequireDefault(require("react-icon-base"));

var _classnames2 = _interopRequireDefault(require("classnames"));

var _iconsMap = _interopRequireDefault(require("./mapping/iconsMap"));

var __rest = void 0 && (void 0).__rest || function (s, e) {
  var t = {};

  for (var p in s) {
    if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
  }

  if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
    if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]];
  }
  return t;
};

var BaseIcon = function BaseIcon(props) {
  var name = props.name,
      className = props.className,
      style = props.style,
      other = __rest(props, ["name", "className", "style"]);

  var classNames = (0, _classnames2["default"])((0, _defineProperty2["default"])({}, className || '', className || ''));
  return /*#__PURE__*/_react["default"].createElement("span", {
    role: "img",
    className: "anticon cuk2-icon-".concat(name.toLowerCase(), " ").concat(classNames)
  }, /*#__PURE__*/_react["default"].createElement(_reactIconBase["default"] // @ts-ignore
  , (0, _extends2["default"])({
    viewBox: _iconsMap["default"][name].viewBox,
    style: (0, _extends2["default"])({
      verticalAlign: 'baseline'
    }, style)
  }, other), // @ts-ignore
  _iconsMap["default"][name].svg));
};

var _default = BaseIcon;
exports["default"] = _default;