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