import{c as m,o as r,w as u,e as v,b as w,m as g,T as _}from"./vue.esm-bundler.js?ver=1.5.4";import{_ as $}from"./_plugin-vue_export-helper.js?ver=1.5.4";const z={key:0},E={__name:"TransitionAccordion",props:{visible:{type:Boolean,default:!1},duration:{type:Number,default:300},horizontal:{type:Boolean,default:!1}},setup(n){const o=n,e=o.duration,c=t=>{o.horizontal?t.style.width="0":t.style.height="0",t.style.opacity="0",t.style.overflow="hidden"},h=(t,i)=>{if(o.horizontal){const s=t.scrollWidth+"px";t.style.transition=`width ${e}ms ease, opacity ${e}ms ease`,requestAnimationFrame(()=>{t.style.width=s,t.style.opacity="1"})}else{const s=t.scrollHeight+"px";t.style.transition=`height ${e}ms ease, opacity ${e}ms ease`,requestAnimationFrame(()=>{t.style.height=s,t.style.opacity="1"})}setTimeout(()=>i(),e)},l=t=>{o.horizontal?t.style.width="auto":t.style.height="auto",t.style.overflow=""},d=t=>{o.horizontal?t.style.width=t.scrollWidth+"px":t.style.height=t.scrollHeight+"px",t.style.opacity="1",t.style.overflow="hidden"},y=(t,i)=>{t.offsetHeight,o.horizontal?(t.style.transition=`width ${e}ms ease, opacity ${e}ms ease`,t.style.width="0"):(t.style.transition=`height ${e}ms ease, opacity ${e}ms ease`,t.style.height="0"),t.style.opacity="0";const s=o.horizontal?"width":"height",a=p=>{p.propertyName===s&&(t.removeEventListener("transitionend",a),i())};t.addEventListener("transitionend",a)},f=t=>{};return(t,i)=>(r(),m(_,{onBeforeEnter:c,onEnter:h,onAfterEnter:l,onBeforeLeave:d,onLeave:y,onAfterLeave:f,mode:"in-out"},{default:u(()=>[n.visible?(r(),v("div",z,[g(t.$slots,"default",{},void 0,!0)])):w("",!0)]),_:3}))}},L=$(E,[["__scopeId","data-v-10073793"]]);export{L as T};
