import{r as c,o as _,cC as $,c_ as q,j as A,de as B,df as D,dg as x}from"./index-c5c88b67.js";const G={entering:{transform:"none"},entered:{transform:"none"}},H=c.forwardRef(function(h,p){const e=_(),g={enter:e.transitions.duration.enteringScreen,exit:e.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),C=$(i,q(s),p),o=n=>t=>{if(n){const r=i.current;t===void 0?n(r):n(r,t)}},L=o(T),k=o((n,t)=>{D(n);const r=x({style:a,timeout:d,easing:l},{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),S=o(P),b=o(n=>{const t=x({style:a,timeout:d,easing:l},{mode:"exit"});n.style.webkitTransition=e.transitions.create("transform",t),n.style.transition=e.transitions.create("transform",t),u&&u(n)}),z=o(w),F=n=>{f&&f(i.current,n)};return A.jsx(Z,{appear:R,in:E,nodeRef:i,onEnter:k,onEntered:v,onEntering:L,onExit:b,onExited:z,onExiting:S,addEndListener:F,timeout:d,...j,children:(n,t)=>c.cloneElement(s,{style:{transform:"scale(0)",visibility:n==="exited"&&!E?"hidden":void 0,...G[n],...a,...s.props.style},ref:C,...t})})}),M=H;export{M as Z};
