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 BellMute(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 24 24",
    fill: "none",
    height: sizeIcon,
    width: sizeIcon
  }, otherProps), /*#__PURE__*/React.createElement("path", {
    d: "M12.93 6.12A3.48 3.48 0 0 0 12 6a4 4 0 0 0-4 4v1.34a1 1 0 1 1-2 0V10a6 6 0 0 1 5-5.91V3a1 1 0 0 1 2 0v1.1l.45.08a1.004 1.004 0 1 1-.52 1.94ZM2.29 20.29l18-18a1.004 1.004 0 0 1 1.42 1.42l-4.12 4.11A6 6 0 0 1 18 10v3.18A3 3 0 0 1 20 16v2a1 1 0 0 1-1 1h-3.14a4 4 0 0 1-7.72 0H6.41l-2.7 2.71a1.001 1.001 0 0 1-1.639-.325 1 1 0 0 1 .219-1.095ZM16 10a3.3 3.3 0 0 0 0-.55L12.41 13H16v-3Zm-4 10a2 2 0 0 0 1.72-1h-3.44A2 2 0 0 0 12 20Zm6-3v-1a1 1 0 0 0-1-1h-6.59l-2 2H18Z",
    fill: "currentColor"
  }));
}

BellMute.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
};
BellMute.defaultProps = {
  color: "neutral",
  size: 24,
  className: "",
  rotation: 0,
  shade: 500,
  padding: 0,
  onMouseEnter: function onMouseEnter() {},
  onMouseLeave: function onMouseLeave() {}
};
export default BellMute;