import React from "react";
import PropTypes from "prop-types";
import { makeStyles } from "@mui/styles";
import { IdUnico } from "@intersoft/utiles";
import { IconButton } from "@mui/material";
import DeleteIcon from "@mui/icons-material/Delete";
import CancelIcon from "@mui/icons-material/Cancel";
import InfoIcon from "@mui/icons-material/Info";
import PictureAsPdfIcon from "@mui/icons-material/PictureAsPdf";
import LockOpenIcon from "@mui/icons-material/LockOpen";
import BorderColorIcon from "@mui/icons-material/BorderColor"; //import ContentCutIcon from '@mui/icons-material/ContentCut';
//import CreditCardOffIcon from '@mui/icons-material/CreditCardOff';
//----------------------------------------------------------
//
//
//

var IconButtonBack = function IconButtonBack(props) {
  var useStyles = makeStyles(function (theme) {
    return {
      customHoverFocus: {
        "&:hover, &.Mui-focusVisible": {
          backgroundColor: props.color
        }
      }
    };
  });
  var classes = useStyles();
  return /*#__PURE__*/React.createElement("div", null, props.visible && /*#__PURE__*/React.createElement(IconButton, {
    id: IdUnico.getCorto("-btn-back-"),
    className: classes.customHoverFocus,
    "aria-label": "Cancel",
    onClick: function onClick() {
      props.onClick();
    }
  }, props.icon === "delete" && /*#__PURE__*/React.createElement(DeleteIcon, null), props.icon === "cancel" && /*#__PURE__*/React.createElement(CancelIcon, null), props.icon === "info" && /*#__PURE__*/React.createElement(InfoIcon, null), props.icon === "pdf" && /*#__PURE__*/React.createElement(PictureAsPdfIcon, null), props.icon === "candado" && /*#__PURE__*/React.createElement(LockOpenIcon, null), props.icon === "edit" && /*#__PURE__*/React.createElement(BorderColorIcon, null)));
}; //----------------------------------------------------------


IconButtonBack.propTypes = {
  visible: PropTypes.bool,
  onClick: PropTypes.func.isRequired,
  icon: PropTypes.string,
  color: PropTypes.string
}; //----------------------------------------------------------

IconButtonBack.defaultProps = {
  visible: true,
  icon: "Cancel",
  color: "red"
}; //----------------------------------------------------------

export default IconButtonBack;