import{r as c,E as J,bt as K,bJ as M,j as $,bK as q,bL as A,bM as x}from"./index-43bf7a1c.js";const B={entering:{transform:"none"},entered:{transform:"none"}},D=c.forwardRef(function(h,p){const o=J(),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=K(i,M(s),p),r=n=>t=>{if(n){const e=i.current;t===void 0?n(e):n(e,t)}},j=r(T),S=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)}),k=r(y),v=r(w),C=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:S,onEntered:k,onEntering:j,onExit:C,onExited:z,onExiting:v,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})})}),N=D;export{N as Z};
