import{nextTick as y}from"vue";import{removeClass as e,addClass as s}from"../vc-util/Dom/class.mjs";const p=(l="ant-motion-collapse",i=!0)=>({name:l,appear:i,css:!0,onBeforeEnter:t=>{t.style.height="0px",t.style.opacity="0",s(t,l)},onEnter:t=>{y(()=>{t.style.height=`${t.scrollHeight}px`,t.style.opacity="1"})},onAfterEnter:t=>{t&&(e(t,l),t.style.height=null,t.style.opacity=null)},onBeforeLeave:t=>{s(t,l),t.style.height=`${t.offsetHeight}px`,t.style.opacity=null},onLeave:t=>{setTimeout(()=>{t.style.height="0px",t.style.opacity="0"})},onAfterLeave:t=>{t&&(e(t,l),t.style&&(t.style.height=null,t.style.opacity=null))}});export{p as default};
