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:"d84ec6e500c1b68e97f3d603bed1ff7d3ffeefab",class:{"digi-expandable-faq":!0}},s(this.afHeadingLevel,{key:"1a71cdaa1d07a35e95a89d2bf4fd058a09971c7a"},this.afHeading),s("slot",{key:"97c1cd09ad0d655fc6f10355c2370f3f880e901c"}))}get hostElement(){return e(this)}};h.style=".sc-digi-expandable-faq-h{display:block}";export{h as digi_expandable_faq}