System.register(["./index-legacy-16e217fd.js","./index-legacy-8310baf3.js"],(function(e,a){"use strict";var l,n,t,r,o,d,s,i,u,c,v,p,g,m,b,y,f,x,h,k,V,j,C,S;return{setters:[e=>{l=e.y,n=e.d,t=e.ac,r=e.aa,o=e.a,d=e.ag,s=e.G,i=e.w,u=e.a3,c=e.A,v=e.I,p=e.ao,g=e.c,m=e.aP,b=e.j,y=e.aq,f=e.L,x=e.V,h=e.aw,k=e.H,V=e.as,j=e.ay},e=>{C=e.c,S=e.C}],execute:function(){const[a,w]=l("collapse"),A=Symbol(a),B={border:s,accordion:Boolean,modelValue:{type:[String,Number,Array],"default":""}};var L=n({name:a,props:B,emits:["change","update:modelValue"],setup(e,{emit:a,slots:l}){const{linkChildren:n,children:s}=t(A),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 o("div",{"class":[w(),{[d]:e.border}]},[null==(a=l["default"])?void 0:a.call(l)])}}});e("C",i(L));const[N,z]=l("collapse-item"),E=["icon","title","value","label","right-icon"],H=u({},C,{name:c,isLink:s,disabled:Boolean,readonly:Boolean,lazyRender:s});var R=n({name:N,props:H,setup(e,{slots:a}){const l=v(),n=v(),{parent:t,index:d}=p(A);if(!t)return;const s=g((()=>{var a;return null!=(a=e.name)?a:d.value})),i=g((()=>t.isExpanded(s.value))),u=v(i.value),c=m((()=>u.value||!e.lazyRender)),w=()=>{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 w()})))}));const B=(e=!i.value)=>{t.toggle(s.value,e)},L=()=>{e.disabled||e.readonly||B()},N=()=>{const{border:l,disabled:n,readonly:t}=e,r=h(e,Object.keys(C));return t&&(r.isLink=!1),(n||t)&&(r.clickable=!1),o(S,k({role:"button","class":z("title",{disabled:n,expanded:i.value,borderless:!l}),"aria-expanded":String(i.value),onClick:L},r),h(a,E))},H=c((()=>{var e;return V(o("div",{ref:l,"class":z("wrapper"),onTransitionend:w},[o("div",{ref:n,"class":z("content")},[null==(e=a["default"])?void 0:e.call(a)])]),[[j,u.value]])}));return r({toggle:B,expanded:i,itemName:s}),()=>o("div",{"class":[z({border:d.value&&e.border})]},[N(),H()])}});e("a",i(R))}}}));
