import{R as C,r as b,j as T}from"./chunk-D4RADZKF-Bmzts4UG.js";import{R as L}from"./index-CF2T9cNf.js";function y(){return y=Object.assign?Object.assign.bind():function(n){for(var a=1;a{n.current=!1},[]),n.current}function F({show:n,enter:a="",enterStart:l="",enterEnd:t="",leave:r="",leaveStart:e="",leaveEnd:i="",appear:s,unmountOnExit:o,tag:u="div",children:c,...d}){const E=a.split(" ").filter(p=>p.length),O=l.split(" ").filter(p=>p.length),I=t.split(" ").filter(p=>p.length),P=r.split(" ").filter(p=>p.length),M=e.split(" ").filter(p=>p.length),U=i.split(" ").filter(p=>p.length),R=o;function D(p,h){h.length>0&&p.classList.add(...h)}function _(p,h){h.length>0&&p.classList.remove(...h)}const f=b.useRef(null),H=u;return T.jsx($,{appear:s,nodeRef:f,unmountOnExit:R,in:n,addEndListener:p=>{var h;(h=f.current)==null||h.addEventListener("transitionend",p,!1)},onEnter:()=>{var p;!R&&((p=f.current)!=null&&p.style)&&(f.current.style.display=""),D(f.current,[...E,...O])},onEntering:()=>{_(f.current,O),D(f.current,I)},onEntered:()=>{_(f.current,[...I,...E])},onExit:()=>{D(f.current,[...P,...M])},onExiting:()=>{_(f.current,M),D(f.current,U)},onExited:()=>{var p;_(f.current,[...U,...P]),!R&&((p=f.current)!=null&&p.style)&&(f.current.style.display="none")},"data-oid":"3xb17s8",children:T.jsx(H,{ref:f,...d,style:{display:R?null:"none"},"data-oid":"i8vkx2r",children:c})})}function et({show:n,appear:a,...l}){const{parent:t}=b.useContext(X),r=Y();return n===void 0?T.jsx(F,{appear:t.appear||!t.isInitialRender,show:t.show,...l,"data-oid":"nymwq1i"}):T.jsx(X.Provider,{value:{parent:{show:n,isInitialRender:r,appear:a}},"data-oid":"1:8ke-z",children:T.jsx(F,{appear:a,show:n,...l,"data-oid":"ai3jajt"})})}export{et as T};