{"ast":null,"code":"\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _utils = require(\"../utils\");\nvar _excluded = [\"icon\", \"className\", \"onClick\", \"style\", \"primaryColor\", \"secondaryColor\"];\nvar twoToneColorPalette = {\n primaryColor: '#333',\n secondaryColor: '#E6E6E6',\n calculated: false\n};\nfunction setTwoToneColors(_ref) {\n var primaryColor = _ref.primaryColor,\n secondaryColor = _ref.secondaryColor;\n twoToneColorPalette.primaryColor = primaryColor;\n twoToneColorPalette.secondaryColor = secondaryColor || (0, _utils.getSecondaryColor)(primaryColor);\n twoToneColorPalette.calculated = !!secondaryColor;\n}\nfunction getTwoToneColors() {\n return (0, _objectSpread2.default)({}, twoToneColorPalette);\n}\nvar IconBase = function IconBase(props) {\n var icon = props.icon,\n className = props.className,\n onClick = props.onClick,\n style = props.style,\n primaryColor = props.primaryColor,\n secondaryColor = props.secondaryColor,\n restProps = (0, _objectWithoutProperties2.default)(props, _excluded);\n var svgRef = React.useRef();\n var colors = twoToneColorPalette;\n if (primaryColor) {\n colors = {\n primaryColor: primaryColor,\n secondaryColor: secondaryColor || (0, _utils.getSecondaryColor)(primaryColor)\n };\n }\n (0, _utils.useInsertStyles)(svgRef);\n (0, _utils.warning)((0, _utils.isIconDefinition)(icon), \"icon should be icon definiton, but got \".concat(icon));\n if (!(0, _utils.isIconDefinition)(icon)) {\n return null;\n }\n var target = icon;\n if (target && typeof target.icon === 'function') {\n target = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, target), {}, {\n icon: target.icon(colors.primaryColor, colors.secondaryColor)\n });\n }\n return (0, _utils.generate)(target.icon, \"svg-\".concat(target.name), (0, _objectSpread2.default)((0, _objectSpread2.default)({\n className: className,\n onClick: onClick,\n style: style,\n 'data-icon': target.name,\n width: '1em',\n height: '1em',\n fill: 'currentColor',\n 'aria-hidden': 'true'\n }, restProps), {}, {\n ref: svgRef\n }));\n};\nIconBase.displayName = 'IconReact';\nIconBase.getTwoToneColors = getTwoToneColors;\nIconBase.setTwoToneColors = setTwoToneColors;\nvar _default = exports.default = IconBase;","map":{"version":3,"names":["_interopRequireDefault","require","default","_interopRequireWildcard","Object","defineProperty","exports","value","_objectWithoutProperties2","_objectSpread2","React","_utils","_excluded","twoToneColorPalette","primaryColor","secondaryColor","calculated","setTwoToneColors","_ref","getSecondaryColor","getTwoToneColors","IconBase","props","icon","className","onClick","style","restProps","svgRef","useRef","colors","useInsertStyles","warning","isIconDefinition","concat","target","generate","name","width","height","fill","ref","displayName","_default"],"sources":["C:/Users/Аришина)/Desktop/promo/node_modules/@ant-design/icons/lib/components/IconBase.js"],"sourcesContent":["\"use strict\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\").default;\nvar _interopRequireWildcard = require(\"@babel/runtime/helpers/interopRequireWildcard\").default;\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _objectWithoutProperties2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectWithoutProperties\"));\nvar _objectSpread2 = _interopRequireDefault(require(\"@babel/runtime/helpers/objectSpread2\"));\nvar React = _interopRequireWildcard(require(\"react\"));\nvar _utils = require(\"../utils\");\nvar _excluded = [\"icon\", \"className\", \"onClick\", \"style\", \"primaryColor\", \"secondaryColor\"];\nvar twoToneColorPalette = {\n primaryColor: '#333',\n secondaryColor: '#E6E6E6',\n calculated: false\n};\nfunction setTwoToneColors(_ref) {\n var primaryColor = _ref.primaryColor,\n secondaryColor = _ref.secondaryColor;\n twoToneColorPalette.primaryColor = primaryColor;\n twoToneColorPalette.secondaryColor = secondaryColor || (0, _utils.getSecondaryColor)(primaryColor);\n twoToneColorPalette.calculated = !!secondaryColor;\n}\nfunction getTwoToneColors() {\n return (0, _objectSpread2.default)({}, twoToneColorPalette);\n}\nvar IconBase = function IconBase(props) {\n var icon = props.icon,\n className = props.className,\n onClick = props.onClick,\n style = props.style,\n primaryColor = props.primaryColor,\n secondaryColor = props.secondaryColor,\n restProps = (0, _objectWithoutProperties2.default)(props, _excluded);\n var svgRef = React.useRef();\n var colors = twoToneColorPalette;\n if (primaryColor) {\n colors = {\n primaryColor: primaryColor,\n secondaryColor: secondaryColor || (0, _utils.getSecondaryColor)(primaryColor)\n };\n }\n (0, _utils.useInsertStyles)(svgRef);\n (0, _utils.warning)((0, _utils.isIconDefinition)(icon), \"icon should be icon definiton, but got \".concat(icon));\n if (!(0, _utils.isIconDefinition)(icon)) {\n return null;\n }\n var target = icon;\n if (target && typeof target.icon === 'function') {\n target = (0, _objectSpread2.default)((0, _objectSpread2.default)({}, target), {}, {\n icon: target.icon(colors.primaryColor, colors.secondaryColor)\n });\n }\n return (0, _utils.generate)(target.icon, \"svg-\".concat(target.name), (0, _objectSpread2.default)((0, _objectSpread2.default)({\n className: className,\n onClick: onClick,\n style: style,\n 'data-icon': target.name,\n width: '1em',\n height: '1em',\n fill: 'currentColor',\n 'aria-hidden': 'true'\n }, restProps), {}, {\n ref: svgRef\n }));\n};\nIconBase.displayName = 'IconReact';\nIconBase.getTwoToneColors = getTwoToneColors;\nIconBase.setTwoToneColors = setTwoToneColors;\nvar _default = exports.default = IconBase;"],"mappings":"AAAA,YAAY;;AAEZ,IAAIA,sBAAsB,GAAGC,OAAO,CAAC,8CAA8C,CAAC,CAACC,OAAO;AAC5F,IAAIC,uBAAuB,GAAGF,OAAO,CAAC,+CAA+C,CAAC,CAACC,OAAO;AAC9FE,MAAM,CAACC,cAAc,CAACC,OAAO,EAAE,YAAY,EAAE;EAC3CC,KAAK,EAAE;AACT,CAAC,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