const a=t=>{const i=t.scrollHeight,s=t.style.transition;t.style.transition="",t.style.overflow="hidden",requestAnimationFrame(()=>{t.style.height=`${i}px`,t.style.transition=s,requestAnimationFrame(()=>{t.style.height="0px"})}),t.setAttribute("data-collapsed","true"),t.removeAttribute("data-expanded")},o=t=>{const i=t.scrollHeight;t.style.height=`${i}px`,t.addEventListener("transitionend",()=>{t.getAttribute("data-expanded")==="true"&&(t.style.height="auto",t.style.overflow="visible")},{once:!0}),t.setAttribute("data-expanded","true"),t.removeAttribute("data-collapsed")};export{a as c,o as e}; //# sourceMappingURL=expand-collapse-1ef905ba.js.map