import t from"../../../../@babel/runtime/helpers/esm/extends.js";import e from"../../../../@babel/runtime/helpers/esm/slicedToArray.js";import n from"../../../../@babel/runtime/helpers/esm/objectWithoutProperties.js";import*as o from"react";import r from"../../../../prop-types/index.js";import i from"../styles/useTheme.js";import{reflow as a,getTransitionProps as s}from"../transitions/utils.js";import u from"../utils/useForkRef.js";import c from"../../../../react-transition-group/esm/Transition.js";function m(t){return"scale(".concat(t,", ").concat(Math.pow(t,2),")")}var d={entering:{opacity:1,transform:m(1)},entered:{opacity:1,transform:"none"}},l=o.forwardRef((function(r,l){var f=r.children,p=r.disableStrictModeCompat,E=void 0!==p&&p,y=r.in,b=r.onEnter,x=r.onEntered,g=r.onEntering,h=r.onExit,v=r.onExited,j=r.onExiting,T=r.style,R=r.timeout,C=void 0===R?"auto":R,M=r.TransitionComponent,A=void 0===M?c:M,H=n(r,["children","disableStrictModeCompat","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"]),S=o.useRef(),D=o.useRef(),O=i(),w=O.unstable_strictMode&&!E,N=o.useRef(null),_=u(f.ref,l),k=u(w?N:void 0,_),F=function(t){return function(n,o){if(t){var r=w?[N.current,n]:[n,o],i=e(r,2),a=i[0],s=i[1];void 0===s?t(a):t(a,s)}}},L=F(g),P=F((function(t,e){a(t);var n,o=s({style:T,timeout:C},{mode:"enter"}),r=o.duration,i=o.delay;"auto"===C?(n=O.transitions.getAutoHeightDuration(t.clientHeight),D.current=n):n=r,t.style.transition=[O.transitions.create("opacity",{duration:n,delay:i}),O.transitions.create("transform",{duration:.666*n,delay:i})].join(","),b&&b(t,e)})),V=F(x),W=F(j),q=F((function(t){var e,n=s({style:T,timeout:C},{mode:"exit"}),o=n.duration,r=n.delay;"auto"===C?(e=O.transitions.getAutoHeightDuration(t.clientHeight),D.current=e):e=o,t.style.transition=[O.transitions.create("opacity",{duration:e,delay:r}),O.transitions.create("transform",{duration:.666*e,delay:r||.333*e})].join(","),t.style.opacity="0",t.style.transform=m(.75),h&&h(t)})),z=F(v);return o.useEffect((function(){return function(){clearTimeout(S.current)}}),[]),o.createElement(A,t({appear:!0,in:y,nodeRef:w?N:void 0,onEnter:P,onEntered:V,onEntering:L,onExit:q,onExited:z,onExiting:W,addEndListener:function(t,e){var n=w?t:e;"auto"===C&&(S.current=setTimeout(n,D.current||0))},timeout:"auto"===C?null:C},H),(function(e,n){return o.cloneElement(f,t({style:t({opacity:0,transform:m(.75),visibility:"exited"!==e||y?void 0:"hidden"},d[e],T,f.props.style),ref:k},n))}))}));"production"!==process.env.NODE_ENV&&(l.propTypes={children:r.element,disableStrictModeCompat:r.bool,in:r.bool,onEnter:r.func,onEntered:r.func,onEntering:r.func,onExit:r.func,onExited:r.func,onExiting:r.func,style:r.object,timeout:r.oneOfType([r.oneOf(["auto"]),r.number,r.shape({appear:r.number,enter:r.number,exit:r.number})])}),l.muiSupportAuto=!0;export default l;
//# sourceMappingURL=Grow.js.map
