import _extends from "@babel/runtime/helpers/extends";

/* eslint-disable max-len */
import React from "react";
import PropTypes from "prop-types";
import classnames from "classnames";
import makeStyles from "../styles/makeStyles";
import { getShades } from "../styles/colors";

var deprecationWarning = function deprecationWarning(message) {
  if (process.env.NODE_ENV === "development") {
    // eslint-disable-next-line no-console
    console.warn("[Clever-react]: ".concat(message));
  }
};

var getClasses = makeStyles(function (_ref) {
  var colors = _ref.cleverUI.colors;
  return {
    root: function root(_ref2) {
      var rotation = _ref2.rotation,
          padding = _ref2.padding,
          size = _ref2.size,
          color = _ref2.color,
          shade = _ref2.shade;
      var res = {
        color: colors[color] ? colors[color][shade] : color
      };

      if (rotation > 0) {
        res.transform = "rotate(".concat(rotation, "deg)");
      }

      if (padding > 0) {
        res.padding = "".concat(size * padding / 200, "px");
      }

      return res;
    }
  };
});
var shadesList = getShades();

function Gender(props) {
  var classes = getClasses(props);
  var size = props.size,
      padding = props.padding,
      className = props.className,
      onMouseEnter = props.onMouseEnter,
      onMouseLeave = props.onMouseLeave;
  var sizeIcon = size;
  var otherProps = {
    className: classnames(className, classes.root),
    onMouseEnter: onMouseEnter,
    onMouseLeave: onMouseLeave
  };

  if (padding) {
    deprecationWarning("The padding prop is deprecated, use a className for customization");
    sizeIcon = sizeIcon * (100 - padding) / 100;
  }

  return /*#__PURE__*/React.createElement("svg", _extends({
    viewBox: "0 0 16 16",
    fill: "none",
    height: sizeIcon,
    width: sizeIcon
  }, otherProps), /*#__PURE__*/React.createElement("path", {
    d: "M10.315 8.207a4.683 4.683 0 0 0 1.559-3.501C11.874 2.106 9.82 0 7.289 0S2.705 2.107 2.705 4.706a4.68 4.68 0 0 0 1.604 3.501C1.688 9.426.003 12.105 0 15.06c0 .52.41.941.917.941a.93.93 0 0 0 .917-.941c0-3.119 2.463-5.647 5.501-5.647 3.039 0 5.502 2.528 5.502 5.647 0 .52.41.941.917.941a.93.93 0 0 0 .917-.941c-.011-2.965-1.716-5.647-4.356-6.852ZM7.29 7.53c-1.519 0-2.75-1.264-2.75-2.823 0-1.56 1.231-2.824 2.75-2.824 1.52 0 2.751 1.264 2.751 2.824 0 .749-.29 1.467-.806 1.996a2.715 2.715 0 0 1-1.945.827Zm7.794-4.705a.93.93 0 0 0-.917.94v1.883c0 .52.41.941.917.941a.93.93 0 0 0 .917-.94V3.764a.93.93 0 0 0-.917-.941Zm-.688 4.978c-.167.18-.262.42-.265.669-.002.25.094.49.265.668.09.083.192.15.303.197.222.101.475.101.697 0a.836.836 0 0 0 .495-.508.809.809 0 0 0 .073-.357.942.942 0 0 0-.565-.875.9.9 0 0 0-1.003.206Z",
    fill: "currentColor"
  }));
}

Gender.propTypes = {
  color: PropTypes.string,
  className: PropTypes.string,
  size: PropTypes.number,
  onMouseEnter: PropTypes.func,
  onMouseLeave: PropTypes.func,
  rotation: PropTypes.number,
  shade: PropTypes.oneOf(shadesList),
  padding: PropTypes.number
};
Gender.defaultProps = {
  color: "neutral",
  size: 24,
  className: "",
  rotation: 0,
  shade: 500,
  padding: 0,
  onMouseEnter: function onMouseEnter() {},
  onMouseLeave: function onMouseLeave() {}
};
export default Gender;