"use strict";

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

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

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

var getCurIcon = function getCurIcon(Icons, type, isFill, extraProps) {
  if (!type) return null;
  var upperCaseType = type === null || type === void 0 ? void 0 : type.replace(/(^.{1})/, function ($1) {
    return $1.toUpperCase();
  });
  var iconType = isFill ? 'Fill' : 'Line';
  var Comp = Icons[upperCaseType + iconType];
  return /*#__PURE__*/_react.default.createElement(Comp, Object.assign({}, extraProps));
};

exports.getCurIcon = getCurIcon;