System.register(["./index-legacy-e74bb2df.js","./index-legacy-c5f8b760.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,C,S,j;return{setters:[e=>{l=e.t,n=e.d,t=e.y,r=e.ag,d=e.a,o=e.al,s=e.v,i=e.C,u=e.D,c=e.w,v=e.Q,p=e.G,g=e.c,m=e.aR,b=e.S,y=e.as,f=e.V,x=e.a0,h=e.ay,k=e.J,V=e.au,C=e.aA},e=>{S=e.c,j=e.C}],execute:function(){const[a,A]=l("collapse"),B=Symbol(a),N={border:s,accordion:Boolean,modelValue:{type:[String,Number,Array],"default":""}};var R=n({name:a,props:N,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":[A(),{[o]:e.border}]},[null==(a=l["default"])?void 0:a.call(l)])}}});e("C",i(R));const[w,z]=l("collapse-item"),D=["icon","title","value","label","right-icon"],E=u({},S,{name:c,isLink:s,disabled:Boolean,readonly:Boolean,lazyRender:s});var L=n({name:w,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)),A=()=>{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 A()})))}));const N=(e=!i.value)=>{t.toggle(s.value,e)},R=()=>{e.disabled||e.readonly||N()},w=()=>{const{border:l,disabled:n,readonly:t}=e,r=h(e,Object.keys(S));return t&&(r.isLink=!1),(n||t)&&(r.clickable=!1),d(j,k({role:"button","class":z("title",{disabled:n,expanded:i.value,borderless:!l}),"aria-expanded":String(i.value),onClick:R},r),h(a,D))},E=c((()=>{var e;return V(d("div",{ref:l,"class":z("wrapper"),onTransitionend:A},[d("div",{ref:n,"class":z("content")},[null==(e=a["default"])?void 0:e.call(a)])]),[[C,u.value]])}));return r({toggle:N,expanded:i,itemName:s}),()=>d("div",{"class":[z({border:o.value&&e.border})]},[w(),E()])}});e("a",i(L))}}}));
