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 TwitterCircle(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("path", {
      d: "M8 16C12.4183 16 16 12.4183 16 8C16 3.58172 12.4183 0 8 0C3.58172 0 0 3.58172 0 8C0 12.4183 3.58172 16 8 16Z",
      fill: "black"
    }), /*#__PURE__*/React.createElement("path", {
      d: "M3.52194 4L6.99674 8.64614L3.5 12.4236H4.28698L7.34837 9.11638L9.82189 12.4236H12.5L8.82969 7.51617L12.0844 4H11.2975L8.47807 7.04592L6.20005 4H3.52194ZM4.67925 4.57969H5.90958L11.3425 11.8439H10.1122L4.67925 4.57969Z",
      fill: "white"
    }))
  );
}

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