import e from"../../../../@babel/runtime/helpers/esm/extends.js";import o from"../../../../@babel/runtime/helpers/esm/objectWithoutProperties.js";import*as t from"react";import r from"../../../../prop-types/index.js";import i from"../../../../clsx/dist/clsx.m.js";import a from"../styles/withStyles.js";import{fade as n}from"../styles/colorManipulator.js";import l from"../utils/capitalize.js";import s from"../ButtonBase/ButtonBase.js";import d from"../../../utils/esm/chainPropTypes.js";var c=function(e){return{root:{textAlign:"center",flex:"0 0 auto",fontSize:e.typography.pxToRem(24),padding:12,borderRadius:"50%",overflow:"visible",color:e.palette.action.active,transition:e.transitions.create("background-color",{duration:e.transitions.duration.shortest}),"&:hover":{backgroundColor:n(e.palette.action.active,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}},"&$disabled":{backgroundColor:"transparent",color:e.palette.action.disabled}},edgeStart:{marginLeft:-12,"$sizeSmall&":{marginLeft:-3}},edgeEnd:{marginRight:-12,"$sizeSmall&":{marginRight:-3}},colorInherit:{color:"inherit"},colorPrimary:{color:e.palette.primary.main,"&:hover":{backgroundColor:n(e.palette.primary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},colorSecondary:{color:e.palette.secondary.main,"&:hover":{backgroundColor:n(e.palette.secondary.main,e.palette.action.hoverOpacity),"@media (hover: none)":{backgroundColor:"transparent"}}},disabled:{},sizeSmall:{padding:3,fontSize:e.typography.pxToRem(18)},label:{width:"100%",display:"flex",alignItems:"inherit",justifyContent:"inherit"}}},p=t.forwardRef((function(r,a){var n=r.edge,d=void 0!==n&&n,c=r.children,p=r.classes,m=r.className,u=r.color,h=void 0===u?"default":u,b=r.disabled,f=void 0!==b&&b,g=r.disableFocusRipple,v=void 0!==g&&g,y=r.size,j=void 0===y?"medium":y,R=o(r,["edge","children","classes","className","color","disabled","disableFocusRipple","size"]);return t.createElement(s,e({className:i(p.root,m,"default"!==h&&p["color".concat(l(h))],f&&p.disabled,"small"===j&&p["size".concat(l(j))],{start:p.edgeStart,end:p.edgeEnd}[d]),centerRipple:!0,focusRipple:!v,disabled:f,ref:a},R),t.createElement("span",{className:p.label},c))}));"production"!==process.env.NODE_ENV&&(p.propTypes={children:d(r.node,(function(e){return t.Children.toArray(e.children).some((function(e){return t.isValidElement(e)&&e.props.onClick}))?new Error(["Material-UI: You are providing an onClick event listener to a child of a button element.","Firefox will never trigger the event.","You should move the onClick listener to the parent button element.","https://github.com/mui-org/material-ui/issues/13957"].join("\n")):null})),classes:r.object.isRequired,className:r.string,color:r.oneOf(["default","inherit","primary","secondary"]),disabled:r.bool,disableFocusRipple:r.bool,disableRipple:r.bool,edge:r.oneOf(["start","end",!1]),size:r.oneOf(["small","medium"])});var m=a(c,{name:"MuiIconButton"})(p);export default m;export{c as styles};
//# sourceMappingURL=IconButton.js.map
