"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.IconButtonBase = IconButtonBase;
exports.IconButton = IconButton;
exports.default = void 0;

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectWithoutProperties"));

var _react = _interopRequireDefault(require("react"));

var _IconButton = _interopRequireDefault(require("@material-ui/core/IconButton"));

var _styles = require("@material-ui/core/styles");

var useStyles = function useStyles(props) {
  return (0, _styles.makeStyles)(function (theme) {
    return {
      base: {
        padding: 0,
        "&:hover": {
          backgroundColor: 'transparent'
        }
      }
    };
  });
};

function IconButtonBase(_ref) {
  var children = _ref.children,
      props = (0, _objectWithoutProperties2.default)(_ref, ["children"]);
  var classes = useStyles(props)();
  var classNames = "".concat(classes.base, " ").concat(props.className);
  return /*#__PURE__*/_react.default.createElement(_IconButton.default, Object.assign({}, props, {
    className: classNames,
    disableelevation: true,
    centerRipple: true,
    disableFocusRipple: true
  }), children);
}

function IconButton(_ref2) {
  var children = _ref2.children,
      props = (0, _objectWithoutProperties2.default)(_ref2, ["children"]);
  var classes = useStyles(props)();
  var classNames = "".concat(classes[props.variant], " ").concat(props.className);
  return /*#__PURE__*/_react.default.createElement(IconButtonBase, Object.assign({}, props, {
    className: classNames
  }), children);
}

IconButton.defaultProps = {
  color: 'primary',
  variant: 'contained',
  size: 'medium',
  disabled: false,
  onClick: function onClick() {}
};
var _default = IconButton;
exports.default = _default;