import{r as a,R as u,X as s,j as g}from"./index-B-YXshIJ.js";function f(){return f=Object.assign||function(t){for(var i=1;i<arguments.length;i++){var n=arguments[i];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t},f.apply(this,arguments)}function v(t,i){if(t==null)return{};var n=p(t,i),r,e;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(e=0;e<o.length;e++)r=o[e],!(i.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(t,r)&&(n[r]=t[r])}return n}function p(t,i){if(t==null)return{};var n={},r=Object.keys(t),e,o;for(o=0;o<r.length;o++)e=r[o],!(i.indexOf(e)>=0)&&(n[e]=t[e]);return n}var c=a.forwardRef(function(t,i){var n=t.color,r=n===void 0?"currentColor":n,e=t.size,o=e===void 0?24:e,l=v(t,["color","size"]);return u.createElement("svg",f({ref:i,xmlns:"http://www.w3.org/2000/svg",width:o,height:o,viewBox:"0 0 24 24",fill:"none",stroke:r,strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},l),u.createElement("polyline",{points:"9 18 15 12 9 6"}))});c.propTypes={color:s.string,size:s.oneOfType([s.string,s.number])};c.displayName="ChevronRight";const d=c,m=({children:t,collapse:i,onCollapsed:n})=>{const r=a.useRef(null);return a.useEffect(()=>{setTimeout(()=>{var e;(e=r.current)==null||e.classList.add("grid-rows-[1fr]")},1)},[]),a.useEffect(()=>{var e,o;i&&((e=r.current)==null||e.classList.remove("grid-rows-[1fr]"),(o=r.current)==null||o.addEventListener("transitionend",()=>n==null?void 0:n(),{once:!0}))},[i,n]),g.jsx("div",{ref:r,className:"grid grid-rows-[0fr] transition-[grid-template-rows] duration-200",children:g.jsx("div",{className:"overflow-hidden",children:t})})};export{m as A,d as C};
