import{r as t,h as s,g as e}from"./p-52e3bb32.js";import{E as i,a}from"./p-1f68d501.js";import{l as d}from"./p-e3d2e899.js";const h=class{constructor(s){t(this,s),this.isExpanded=void 0,this.afHeading=void 0,this.afHeadingLevel=i.H2,this.afVariation=a.PRIMARY,this.listItems=[]}componentWillLoad(){this.getListItems(),this.setFaqItemProps()}componentWillUpdate(){this.getListItems(),this.setFaqItemProps()}getListItems(){const t=this.hostElement.querySelectorAll("digi-expandable-faq-item");!t||t.length<=0?d.warn("The slot contains no children elements.",this.hostElement):this.listItems=[...Array.from(t)].map((t=>({outerHTML:t.outerHTML,ref:t})))}setFaqItemProps(){this.listItems&&this.listItems.forEach((t=>{t.ref.afVariation=this.afVariation;try{const s=Number.parseInt(this.afHeadingLevel.split("h")[1]);t.ref.afHeadingLevel="h"+(s+1)}catch(t){}}))}render(){return s("div",{key:"fde7684ab703ddbe07b156035ba37050ed3dda1b",class:{"digi-expandable-faq":!0}},s(this.afHeadingLevel,{key:"f2e2dfac429cdfed99c9f71071770918cf38df70"},this.afHeading),s("slot",{key:"a9289be94c96e969748c8bc76a701efb2e2b56d7"}))}get hostElement(){return e(this)}};h.style=".sc-digi-expandable-faq-h{display:block}";export{h as digi_expandable_faq}