import{W as e,Y as t,a5 as o,_ as n,a8 as i,ad as a,X as r,a7 as s}from"./vendor.js?ver=3.1.10";import{_ as l}from"./fc-bits-ui.js?ver=3.1.10";const d=l({name:"TransitionFade",props:{visible:{type:Boolean,default:!1}}},[["render",function(r,s,l,d,f,u){return e(),t(a,null,{default:o(()=>[l.visible?n(r.$slots,"default",{key:0},void 0,!0):i("",!0)],void 0),_:3})}],["__scopeId","data-v-5204b068"]]),f={name:"TransitionAccordion",props:{visible:{type:Boolean,default:!1},duration:{type:Number,default:300}},methods:{beforeEnter(e){e.style.height="0",e.style.opacity="0",e.style.overflow="hidden"},enter(e,t){const o=e.scrollHeight+"px";e.style.transition=`height ${this.duration}ms ease, opacity ${this.duration}ms ease`,requestAnimationFrame(()=>{e.style.height=o,e.style.opacity="1"}),setTimeout(()=>t(),this.duration)},afterEnter(e){e.style.height="auto",e.style.overflow=""},beforeLeave(e){e.style.height=e.scrollHeight+"px",e.style.opacity="1",e.style.overflow="hidden"},leave(e,t){e.offsetHeight,e.style.transition=`height ${this.duration}ms ease, opacity ${this.duration}ms ease`,e.style.height="0",e.style.opacity="0";const o=()=>{e.style.transition="",e.style.height="",e.style.opacity="",e.style.overflow="",e.removeEventListener("transitionend",o),t()};e.addEventListener("transitionend",o)},afterLeave(e){}}},u={key:0};const v=l(f,[["render",function(s,l,d,f,v,y){return e(),t(a,{onBeforeEnter:y.beforeEnter,onEnter:y.enter,onAfterEnter:y.afterEnter,onBeforeLeave:y.beforeLeave,onLeave:y.leave,onAfterLeave:y.afterLeave,mode:"in-out"},{default:o(()=>[d.visible?(e(),r("div",u,[n(s.$slots,"default",{},void 0,!0)])):i("",!0)],void 0),_:3},8,["onBeforeEnter","onEnter","onAfterEnter","onBeforeLeave","onLeave","onAfterLeave"])}],["__scopeId","data-v-dcfff484"]]);const y=l({name:"Animation",components:{TransitionFade:d,TransitionAccordion:v},props:{visible:{type:Boolean,default:!1},duration:{type:Number,default:300},fade:{type:Boolean,default:!1},accordion:{type:Boolean,default:!1}},computed:{TransitionComponent(){return this.fade?d:v}}},[["render",function(i,a,r,l,d,f){return e(),t(s(f.TransitionComponent),{visible:r.visible,duration:r.duration},{default:o(()=>[n(i.$slots,"default")],void 0),_:3},8,["visible","duration"])}]]);export{y as A};
