"use strict";var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;exports.__esModule = true;exports.BaseIcon = void 0;var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));var _react = _interopRequireDefault(require("react"));


var _forwardRefAndName = require("../../lib/forwardRefAndName");

var _BaseIcon = require("./BaseIcon.styles");var _excluded = ["color", "size", "style", "aria-hidden", "viewBoxSize", "align", "children"];


















var BaseIcon = exports.BaseIcon = (0, _forwardRefAndName.forwardRefAndName)(
  'BaseIcon',
  function (_ref,

  ref)
  {var color = _ref.color,size = _ref.size,style = _ref.style,_ref$ariaHidden = _ref['aria-hidden'],ariaHidden = _ref$ariaHidden === void 0 ? true : _ref$ariaHidden,_ref$viewBoxSize = _ref.viewBoxSize,viewBoxSize = _ref$viewBoxSize === void 0 ? 16 : _ref$viewBoxSize,_ref$align = _ref.align,align = _ref$align === void 0 ? 'center' : _ref$align,children = _ref.children,rest = (0, _objectWithoutPropertiesLoose2.default)(_ref, _excluded);
    var icon = /*#__PURE__*/
    _react.default.createElement("svg", (0, _extends2.default)({
      ref: ref,
      width: size || viewBoxSize,
      height: size || viewBoxSize,
      style: (0, _extends2.default)({
        fill: color != null ? color : 'currentColor',
        marginBottom: align === 'none' || align === 'center' ? 0 : '-0.1875em',
        flexShrink: 0 },
      style),

      xmlns: "http://www.w3.org/2000/svg",
      viewBox: "0 0 " + viewBoxSize + " " + viewBoxSize,
      "aria-hidden": ariaHidden },
    rest),

    children
    );


    if (align === 'center') {
      return /*#__PURE__*/_react.default.createElement("span", { className: _BaseIcon.styles.centeredIcon() }, icon);
    }

    return icon;
  }
);