import{r as c,q as F,cX as X,f9 as $,j as A,fa as B,fb as D,fc as x}from"./index-c1429e77.js";const G={entering:{transform:"none"},entered:{transform:"none"}},H=c.forwardRef(function(h,p){const o=F(),g={enter:o.transitions.duration.enteringScreen,exit:o.transitions.duration.leavingScreen},{addEndListener:f,appear:R=!0,children:s,easing:l,in:E,onEnter:m,onEntered:y,onEntering:T,onExit:u,onExited:w,onExiting:P,style:a,timeout:d=g,TransitionComponent:Z=B,...j}=h,i=c.useRef(null),L=X(i,$(s),p),r=n=>t=>{if(n){const e=i.current;t===void 0?n(e):n(e,t)}},S=r(T),b=r((n,t)=>{D(n);const e=x({style:a,timeout:d,easing:l},{mode:"enter"});n.style.webkitTransition=o.transitions.create("transform",e),n.style.transition=o.transitions.create("transform",e),m&&m(n,t)}),k=r(y),v=r(P),C=r(n=>{const t=x({style:a,timeout:d,easing:l},{mode:"exit"});n.style.webkitTransition=o.transitions.create("transform",t),n.style.transition=o.transitions.create("transform",t),u&&u(n)}),q=r(w),z=n=>{f&&f(i.current,n)};return A.jsx(Z,{appear:R,in:E,nodeRef:i,onEnter:b,onEntered:k,onEntering:S,onExit:C,onExited:q,onExiting:v,addEndListener:z,timeout:d,...j,children:(n,{ownerState:t,...e})=>c.cloneElement(s,{style:{transform:"scale(0)",visibility:n==="exited"&&!E?"hidden":void 0,...G[n],...a,...s.props.style},ref:L,...e})})}),M=H;export{M as Z};
