import{r as s,h as e,e as l,H as t}from"./p-ee1e0eb4.js";import{D as a}from"./p-cabe9139.js";const i=class{constructor(e){s(this,e),this.isOpen=!0}hostData(){return{class:"sparkle-menu-collapsible--status-open",role:"button",tabindex:"0","aria-label":"Collapsible Menu"}}toggle(){this.isOpen=!this.isOpen,r(this.el,"sparkle-menu-collapsible--status-"),this.el.classList.add("sparkle-menu-collapsible--status-"+(this.isOpen?"open":"closed"))}__stencil_render(){return[e("a",{onClick:()=>this.toggle(),class:"sparkle-menu-collapsible__title"},this.heading,e(a,null)),e("div",{class:"sparkle-menu-collapsible__contents"},e("slot",null))]}get el(){return l(this)}render(){return e(t,this.hostData(),this.__stencil_render())}},r=(s,e)=>{s.classList.forEach((l=>{l.startsWith(e)&&s.classList.remove(l)}))};i.style="collapsible{}";export{i as sparkle_menu_collapsible}