import*as e from"react";import i from"../../../../prop-types/index.js";import t from"../../../../clsx/dist/clsx.m.js";import r from"../utils/useEventCallback.js";var p="undefined"==typeof window?e.useEffect:e.useLayoutEffect;function s(i){var s=i.classes,o=i.pulsate,l=void 0!==o&&o,n=i.rippleX,u=i.rippleY,a=i.rippleSize,c=i.in,m=i.onExited,f=void 0===m?function(){}:m,d=i.timeout,b=e.useState(!1),E=b[0],v=b[1],h=t(s.ripple,s.rippleVisible,l&&s.ripplePulsate),x={width:a,height:a,top:-a/2+u,left:-a/2+n},y=t(s.child,E&&s.childLeaving,l&&s.childPulsate),j=r(f);return p((function(){if(!c){v(!0);var e=setTimeout(j,d);return function(){clearTimeout(e)}}}),[j,c,d]),e.createElement("span",{className:h,style:x},e.createElement("span",{className:y}))}"production"!==process.env.NODE_ENV&&(s.propTypes={classes:i.object.isRequired,in:i.bool,onExited:i.func,pulsate:i.bool,rippleSize:i.number,rippleX:i.number,rippleY:i.number,timeout:i.number.isRequired});export default s;
//# sourceMappingURL=Ripple.js.map
