"use strict";

require("core-js/modules/es.symbol.js");
require("core-js/modules/es.array.filter.js");
require("core-js/modules/es.array.for-each.js");
require("core-js/modules/es.array.push.js");
require("core-js/modules/es.object.define-properties.js");
require("core-js/modules/es.object.define-property.js");
require("core-js/modules/es.object.get-own-property-descriptor.js");
require("core-js/modules/es.object.get-own-property-descriptors.js");
require("core-js/modules/es.object.keys.js");
require("core-js/modules/es.object.to-string.js");
require("core-js/modules/esnext.iterator.constructor.js");
require("core-js/modules/esnext.iterator.filter.js");
require("core-js/modules/esnext.iterator.for-each.js");
require("core-js/modules/web.dom-collections.for-each.js");
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.FcrIcon = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
var _svgDict = require("./svg-dict");
var _jsxRuntime = require("react/jsx-runtime");
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var FcrIcon = exports.FcrIcon = function FcrIcon(_ref) {
  var _colors$iconPrimary, _colors$iconSecondary;
  var className = _ref.className,
    size = _ref.size,
    style = _ref.style,
    type = _ref.type,
    colors = _ref.colors,
    onClick = _ref.onClick;
  var viewBox = (0, _svgDict.getViewBox)(type);
  var path = (0, _svgDict.getPath)(type, _objectSpread(_objectSpread({}, colors), {}, {
    iconPrimary: (_colors$iconPrimary = colors === null || colors === void 0 ? void 0 : colors.iconPrimary) !== null && _colors$iconPrimary !== void 0 ? _colors$iconPrimary : 'transparent',
    iconSecondary: (_colors$iconSecondary = colors === null || colors === void 0 ? void 0 : colors.iconSecondary) !== null && _colors$iconSecondary !== void 0 ? _colors$iconSecondary : 'transparent'
  }));
  var fill = (0, _svgDict.getFill)(type);
  return /*#__PURE__*/(0, _jsxRuntime.jsx)("svg", {
    className: className,
    width: size,
    height: size,
    viewBox: viewBox,
    xmlns: "http://www.w3.org/2000/svg",
    xmlnsXlink: "http://www.w3.org/1999/xlink",
    style: style,
    "data-label": type,
    fill: fill,
    onClick: onClick,
    children: path
  });
};