import{p as t,t as o,H as a,h as e}from"./p-CHfEnK-2.js";import{i as s,d as c,t as i}from"./p-94ZtGp9D.js";const n=t(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.__attachShadow()}get el(){return this}autoCollapse=!1;async componentDidLoad(){if(!s(this.el)){const t=c();i("ifx-accordion",await t)}}async onItemOpen(t){if(this.autoCollapse){const o=Array.from(this.el.querySelectorAll("ifx-accordion-item"));for(const a of o){const o=a;o!==t.target&&await o.open&&(o.open=!1)}}}render(){return e("div",{key:"3c3cc80be721384a1a8e7cb52d8480f11fdbc8ea",class:"accordion-wrapper"},e("slot",{key:"8216da5ba75604ada6f177eab26359e35d8d13ae"}))}static get delegatesFocus(){return!0}static get style(){return":host{display:block}.accordion-wrapper{display:flex;flex-direction:column;gap:8px;font-family:var(--ifx-font-family)}"}},[785,"ifx-accordion",{autoCollapse:[4,"auto-collapse"]},[[0,"ifxOpen","onItemOpen"]]]);function r(){"undefined"!=typeof customElements&&["ifx-accordion"].forEach((t=>{"ifx-accordion"===t&&(customElements.get(o(t))||customElements.define(o(t),n))}))}export{n as A,r as d}