import{r as c,F as W,cS as $,cW as q,j as A,dj as B,dk as D,dl as x}from"./index-3141de2d.js";const G={entering:{transform:"none"},entered:{transform:"none"}},H=c.forwardRef(function(h,p){const e=W(),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:j,onExiting:w,style:a,timeout:d=g,TransitionComponent:P=B,...Z}=h,i=c.useRef(null),k=$(i,q(s),p),o=n=>t=>{if(n){const r=i.current;t===void 0?n(r):n(r,t)}},L=o(T),S=o((n,t)=>{D(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)}),v=o(y),C=o(w),F=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(j),z=n=>{l&&l(i.current,n)};return A.jsx(P,{appear:R,in:E,nodeRef:i,onEnter:S,onEntered:v,onEntering:L,onExit:F,onExited:b,onExiting:C,addEndListener:z,timeout:d,...Z,children:(n,t)=>c.cloneElement(s,{style:{transform:"scale(0)",visibility:n==="exited"&&!E?"hidden":void 0,...G[n],...a,...s.props.style},ref:k,...t})})}),M=H;export{M as Z};
