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