System.register(["./index-legacy-69c33129.js","./index-legacy-c13267c7.js"],(function(e,a){"use strict";var l,n,t,r,d,o,s,i,u,c,v,p,g,m,b,y,f,x,h,k,V,j,A,C;return{setters:[e=>{l=e.y,n=e.d,t=e.ae,r=e.ac,d=e.a,o=e.ai,s=e.G,i=e.w,u=e.a5,c=e.A,v=e.I,p=e.aq,g=e.c,m=e.aR,b=e.j,y=e.as,f=e.L,x=e.X,h=e.ay,k=e.H,V=e.au,j=e.aA},e=>{A=e.c,C=e.C}],execute:function(){const[a,S]=l("collapse"),B=Symbol(a),L={border:s,accordion:Boolean,modelValue:{type:[String,Number,Array],"default":""}};var N=n({name:a,props:L,emits:["change","update:modelValue"],setup(e,{emit:a,slots:l}){const{linkChildren:n,children:s}=t(B),i=e=>{a("change",e),a("update:modelValue",e)};return r({toggleAll:(a={})=>{if(e.accordion)return;"boolean"==typeof a&&(a={expanded:a});const{expanded:l,skipDisabled:n}=a,t=s.filter((e=>e.disabled&&n?e.expanded.value:null!=l?l:!e.expanded.value)).map((e=>e.itemName.value));i(t)}}),n({toggle:(a,l)=>{const{accordion:n,modelValue:t}=e;i(n?a===t?"":a:l?t.concat(a):t.filter((e=>e!==a)))},isExpanded:a=>{const{accordion:l,modelValue:n}=e;return l?n===a:n.includes(a)}}),()=>{var a;return d("div",{"class":[S(),{[o]:e.border}]},[null==(a=l["default"])?void 0:a.call(l)])}}});e("a",i(N));const[R,w]=l("collapse-item"),z=["icon","title","value","label","right-icon"],E=u({},A,{name:c,isLink:s,disabled:Boolean,readonly:Boolean,lazyRender:s});var H=n({name:R,props:E,setup(e,{slots:a}){const l=v(),n=v(),{parent:t,index:o}=p(B);if(!t)return;const s=g((()=>{var a;return null!=(a=e.name)?a:o.value})),i=g((()=>t.isExpanded(s.value))),u=v(i.value),c=m((()=>u.value||!e.lazyRender)),S=()=>{i.value?l.value&&(l.value.style.height=""):u.value=!1};b(i,((e,a)=>{null!==a&&(e&&(u.value=!0),(e?f:x)((()=>{if(!n.value||!l.value)return;const{offsetHeight:a}=n.value;if(a){const n=`${a}px`;l.value.style.height=e?"0":n,y((()=>{l.value&&(l.value.style.height=e?n:"0")}))}else S()})))}));const L=(e=!i.value)=>{t.toggle(s.value,e)},N=()=>{e.disabled||e.readonly||L()},R=()=>{const{border:l,disabled:n,readonly:t}=e,r=h(e,Object.keys(A));return t&&(r.isLink=!1),(n||t)&&(r.clickable=!1),d(C,k({role:"button","class":w("title",{disabled:n,expanded:i.value,borderless:!l}),"aria-expanded":String(i.value),onClick:N},r),h(a,z))},E=c((()=>{var e;return V(d("div",{ref:l,"class":w("wrapper"),onTransitionend:S},[d("div",{ref:n,"class":w("content")},[null==(e=a["default"])?void 0:e.call(a)])]),[[j,u.value]])}));return r({toggle:L,expanded:i,itemName:s}),()=>d("div",{"class":[w({border:o.value&&e.border})]},[R(),E()])}});e("C",i(H))}}}));
