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";
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 TelegramIcon(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__*/React.createElement("svg", _extends({
    fillRule: "evenodd",
    strokeLinejoin: "round",
    strokeMiterlimit: "2",
    clipRule: "evenodd",
    width: sizeIcon,
    height: sizeIcon,
    viewBox: "0 0 2225 2225"
  }, otherProps), /*#__PURE__*/React.createElement("path", {
    fill: "url(#telegram-icon-bg)",
    fillRule: "nonzero",
    d: "M1112 0C497.858 0 0 497.858 0 1112c0 614.146 497.862 1112.01 1112 1112.01 614.146 0 1112.01-497.863 1112.01-1112.01C2224.01 497.854 1726.147 0 1112 0z"
  }), /*#__PURE__*/React.createElement("path", {
    fill: "#fff",
    fillRule: "nonzero",
    d: "M1653.09 639.672l-198.612 1001.39s-27.779 69.445-104.167 36.112l-458.333-351.392-166.667-80.554-280.554-94.446s-43.054-15.275-47.221-48.608c-4.166-33.333 48.609-51.392 48.609-51.392l1115.28-437.5s91.666-40.275 91.666 26.392"
  }), /*#__PURE__*/React.createElement("path", {
    fill: "#d3e5f2",
    fillRule: "nonzero",
    d: "M856.746 1629.82s-13.379-1.254-30.046-54.037c-16.666-52.775-101.391-330.55-101.391-330.55l673.612-427.78s38.888-23.608 37.5 0c0 0 6.946 4.167-13.887 23.613-20.834 19.446-529.167 476.383-529.167 476.383"
  }), /*#__PURE__*/React.createElement("path", {
    fill: "#b6d0e5",
    fillRule: "nonzero",
    d: "M1067.71 1460.51l-181.292 165.291s-14.171 10.75-29.675 4.013l34.712-307.025"
  }), /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
    id: "telegram-icon-bg",
    x1: "0",
    x2: "1",
    y1: "0",
    y2: "0",
    gradientTransform: "matrix(0 2215.9 -2215.9 0 1112.01 0)",
    gradientUnits: "userSpaceOnUse"
  }, /*#__PURE__*/React.createElement("stop", {
    offset: "0",
    stopColor: "#3ebde9"
  }), /*#__PURE__*/React.createElement("stop", {
    offset: "1",
    stopColor: "#1da7dd"
  }))));
}

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