1import{B as t}from"./BaseElement.DAzHg0T6.min.js";import{e,n,t as o}from"./vendor-lit.Cg17OMaX.min.js";var i=Object.defineProperty,d=Object.getOwnPropertyDescriptor,c=(t,e,n,o)=>{for(var c,s=o>1?void 0:o?d(e,n):e,a=t.length-1;a>=0;a--)(c=t[a])&&(s=(o?c(e,n,s):c(s))||s);return o&&s&&i(e,n,s),s};let s=class extends t{constructor(){super(),this.expanded=!1,this.boundOnClick=this.onClick.bind(this),this.boundHandleLinkedAccordions=this.handleLinkedAccordions.bind(this)}connectedCallback(){super.connectedCallback(),this.toggleButton.addEventListener("click",this.boundOnClick),this.hasAttribute("data-accordion-group")&&this.toggleButton.addEventListener("click",this.boundHandleLinkedAccordions)}disconnectedCallback(){this.toggleButton.removeEventListener("click",this.boundOnClick),this.boundHandleLinkedAccordions&&this.toggleButton.removeEventListener("click",this.boundHandleLinkedAccordions),super.disconnectedCallback()}onClick(){this.toggleExpand()}showContent(){this.content.setAttribute("data-open","true")}hideContent(){this.content.removeAttribute("data-open")}toggleExpand(){this.expanded?(this.expanded=!1,this.toggleButton.setAttribute("aria-expanded","false"),this.hideContent()):(this.expanded=!0,this.toggleButton.setAttribute("aria-expanded","true"),this.showContent())}handleLinkedAccordions(){document.querySelectorAll(`[data-accordion-group="${this.getAttribute("data-accordion-group")}"]`).forEach(t=>{const e=t;e!==this&&(e.expanded=!1,e.toggleButton.setAttribute("aria-expanded","false"),e.hideContent())})}};c([e("[data-accordion-toggle]")],s.prototype,"toggleButton",2),c([e("[data-accordion-content]")],s.prototype,"content",2),c([n({type:Boolean,reflect:!0})],s.prototype,"expanded",2),s=c([o("custom-accordion")],s);export{s as CustomAccordion};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.