import{_ as q,b as c}from"./OdysseyThemeProvider-Bh0Bu-2o.js";import{r as E}from"./index-NdkWRN8K.js";import{u as A,T as B,g,r as D}from"./utils-kUZVaD1e.js";import{j as G}from"./jsx-runtime-CnH95YSl.js";import{u as H}from"./useIsFocusVisible-DH0qxT5e.js";import{g as J}from"./getReactElementRef-DsIevm5t.js";const K=["addEndListener","appear","children","easing","in","onEnter","onEntered","onEntering","onExit","onExited","onExiting","style","timeout","TransitionComponent"],M={entering:{opacity:1},entered:{opacity:1}},Z=E.forwardRef(function(l,h){const e=A(),y={enter:e.transitions.duration.enteringScreen,exit:e.transitions.duration.leavingScreen},{addEndListener:p,appear:T=!0,children:s,easing:m,in:f,onEnter:x,onEntered:R,onEntering:L,onExit:u,onExited:P,onExiting:j,style:a,timeout:d=y,TransitionComponent:v=B}=l,w=q(l,K),r=E.useRef(null),F=H(r,J(s),h),i=n=>t=>{if(n){const o=r.current;t===void 0?n(o):n(o,t)}},_=i(L),b=i((n,t)=>{D(n);const o=g({style:a,timeout:d,easing:m},{mode:"enter"});n.style.webkitTransition=e.transitions.create("opacity",o),n.style.transition=e.transitions.create("opacity",o),x&&x(n,t)}),C=i(R),k=i(j),S=i(n=>{const t=g({style:a,timeout:d,easing:m},{mode:"exit"});n.style.webkitTransition=e.transitions.create("opacity",t),n.style.transition=e.transitions.create("opacity",t),u&&u(n)}),z=i(P),W=n=>{p&&p(r.current,n)};return G.jsx(v,c({appear:T,in:f,nodeRef:r,onEnter:b,onEntered:C,onEntering:_,onExit:S,onExited:z,onExiting:k,addEndListener:W,timeout:d},w,{children:(n,t)=>E.cloneElement(s,c({style:c({opacity:0,visibility:n==="exited"&&!f?"hidden":void 0},M[n],a,s.props.style),ref:F},t))}))});export{Z as F};
