import './IconRoot_1oipl65.css';
import { objectWithoutProperties as _objectWithoutProperties, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
import React__default from 'react';
import { styled } from '@linaria/react';

var _excluded = ["icon", "size", "color", "className", "sizeCustomProperty", "sizeCustomValue"];
var sizeMap = {
  xxs: 1,
  // 16px
  xs: 1,
  // 16px
  s: 1.5,
  // 24px
  m: 2.25,
  // 36px
  l: 2.75,
  // 44px
  xl: 3.5,
  // 56px
  xxl: 6.25 // 100px
};
var _exp3 = function _exp3() {
  return function (_ref) {
    var w = _ref.w;
    return w;
  };
};
var StyledRoot = /*#__PURE__*/styled('div')({
  name: "StyledRoot",
  "class": "saiei96",
  propsAsIs: false,
  vars: {
    "saiei96-0": [/*#__PURE__*/_exp3()]
  }
});
var IconRoot = function IconRoot(_ref2) {
  var IconComponent = _ref2.icon,
    size = _ref2.size,
    color = _ref2.color,
    className = _ref2.className,
    sizeCustomProperty = _ref2.sizeCustomProperty,
    sizeCustomValue = _ref2.sizeCustomValue,
    rest = _objectWithoutProperties(_ref2, _excluded);
  var c = color || 'var(--text-primary)';
  var w = sizeCustomProperty ? "var(".concat(sizeCustomProperty, ", ").concat(sizeMap[size], "rem)") : sizeCustomValue || "".concat(sizeMap[size], "rem");
  return /*#__PURE__*/React__default.createElement(StyledRoot, _extends({
    "aria-hidden": true,
    w: w,
    className: className
  }, rest), /*#__PURE__*/React__default.createElement(IconComponent, {
    color: c,
    size: size
  }));
};

export { IconRoot };
