import{ar as b,M as v,at as w,au as E}from"./index-OSKNspXo.js";const H=b({name:"QSlideTransition",props:{appear:Boolean,duration:{type:Number,default:300}},emits:["show","hide"],setup(d,{slots:g,emit:p}){let l=!1,r,u,i=null,o=null,n,h;function f(){r==null||r(),r=null,l=!1,i!==null&&(clearTimeout(i),i=null),o!==null&&(clearTimeout(o),o=null),u==null||u.removeEventListener("transitionend",n),n=null}function c(t,e,s){e!==void 0&&(t.style.height=`${e}px`),t.style.transition=`height ${d.duration}ms cubic-bezier(.25, .8, .50, 1)`,l=!0,r=s}function m(t,e){t.style.overflowY=null,t.style.height=null,t.style.transition=null,f(),e!==h&&p(e)}function y(t,e){let s=0;u=t,l===!0?(f(),s=t.offsetHeight===t.scrollHeight?0:void 0):(h="hide",t.style.overflowY="hidden"),c(t,s,e),i=setTimeout(()=>{i=null,t.style.height=`${t.scrollHeight}px`,n=a=>{o=null,(Object(a)!==a||a.target===t)&&m(t,"show")},t.addEventListener("transitionend",n),o=setTimeout(n,d.duration*1.1)},100)}function T(t,e){let s;u=t,l===!0?f():(h="show",t.style.overflowY="hidden",s=t.scrollHeight),c(t,s,e),i=setTimeout(()=>{i=null,t.style.height=0,n=a=>{o=null,(Object(a)!==a||a.target===t)&&m(t,"hide")},t.addEventListener("transitionend",n),o=setTimeout(n,d.duration*1.1)},100)}return v(()=>{l===!0&&f()}),()=>w(E,{css:!1,appear:d.appear,onEnter:y,onLeave:T},g.default)}});export{H as Q};
//# sourceMappingURL=QSlideTransition-DMs238Xo.js.map
