import _extends from "@babel/runtime/helpers/extends";
import React from "react";
import PropTypes from "prop-types";
import classnames from "classnames";
import makeStyles from "../styles/makeStyles";
var getClasses = makeStyles({
  root: function root(_ref) {
    var rotation = _ref.rotation,
        padding = _ref.padding,
        size = _ref.size;
    var res = {};

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

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

    return res;
  }
});

function GoogleChatCircle(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) {
    sizeIcon = sizeIcon * (100 - padding) / 100;
  }

  return (
    /*#__PURE__*/
    // eslint-disable-next-line react/jsx-props-no-spreading
    React.createElement("svg", _extends({
      viewBox: "0 0 16 16",
      fill: "none",
      height: sizeIcon,
      width: sizeIcon
    }, otherProps), /*#__PURE__*/React.createElement("rect", {
      width: "16",
      height: "16",
      rx: "8",
      fill: "#E7E8E9"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M5.54255 8.37007V5.31938H4.20964C3.81727 5.31938 3.5 5.63853 3.5 6.0309V12.3369C3.5 12.6542 3.88298 12.8119 4.10638 12.5885L5.57259 11.1223H9.74781C10.1402 11.1223 10.4574 10.805 10.4574 10.4126V9.07971H6.25407C5.8617 9.07971 5.54255 8.76244 5.54255 8.37007Z",
      fill: "#00AC47"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M11.7904 3.30687H6.25407C5.8617 3.30687 5.54443 3.62414 5.54443 4.01651V5.31939H9.74781C10.1402 5.31939 10.4574 5.63666 10.4574 6.02902V9.07783H11.7904C12.1827 9.07783 12.5 8.76056 12.5 8.3682V4.01651C12.5 3.62414 12.1827 3.30687 11.7904 3.30687Z",
      fill: "#5BB974"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M9.74781 5.31939L5.54255 5.31938L5.54255 8.3682C5.54255 8.76056 5.85983 9.07783 6.25219 9.07783H10.4556V6.0309C10.4574 5.63853 10.1402 5.31939 9.74781 5.31939Z",
      fill: "#00832D"
    }))
  );
}

GoogleChatCircle.propTypes = {
  className: PropTypes.string,
  size: PropTypes.number,
  onMouseEnter: PropTypes.func,
  onMouseLeave: PropTypes.func,
  rotation: PropTypes.number,
  padding: PropTypes.number
};
GoogleChatCircle.defaultProps = {
  size: 24,
  className: "",
  rotation: 0,
  padding: 0,
  onMouseEnter: function onMouseEnter() {},
  onMouseLeave: function onMouseLeave() {}
};
export default GoogleChatCircle;