import{r as s,c as e,h as a,H as t,g as c}from"./p-ClISz4NF.js";import{v as i}from"./p-NOJjz9dT.js";import{a as d,A as o,b as f}from"./p-Cx3bEC5v.js";import{g as n,t as r,b}from"./p-CoD1xawt.js";import{i as h}from"./p-CzXeijOj.js";import{t as p}from"./p-Cjg0wpDG.js";import"./p-CgDnDrq5.js";import"./p-CQvUntGY.js";import"./p-BcQO4NH2.js";import"./p-Bz_RzYFb.js";const l=class{constructor(a){s(this,a);this.govChange=e(this,"gov-change");this.inheritedAttributes={};this.disabled=false;this.open=false;this.h=n(this.host)}validateSize(s){i(f,s,o.root)}componentWillLoad(){this.validateSize(this.size);this.inheritedAttributes=h(this.host)}componentDidRender(){p((()=>this.getPropsFromParents()))}getPropsFromParents(){const s=this.h.getParent(d.root);if(s){this.size=s.getAttribute("size")}}render(){return a(t,{key:"322aca243fd956d90542c23ffd384969a3e702ba",class:this.h.classes([o.root,this.disabled&&o.disabled]),size:this.size,role:"listitem"},a("details",{key:"80befb8ec6ecc9e1718d9e94fc693e382a384512",class:o.details,id:this.identifier,"aria-disabled":r(this.disabled),open:this.open},a("summary",Object.assign({key:"f04df2d0a5c29c9c6621e69ab15c1ac72bc95912",onClick:s=>{s.stopPropagation();s.preventDefault();!this.disabled&&this.toggle().finally()},class:o.summary,tabIndex:this.disabled?-1:0,"aria-expanded":b(this.open)},this.inheritedAttributes),this.h.hasSlot("icon")&&a("span",{key:"0889615c3b616615947e09cb7dc82a45f5bf3c36",class:o.icon},a("slot",{key:"204ee8071c84d94fe44f06781a169c6ed6548748",name:"icon"})),a("span",{key:"2558df9bfa5b027fd78858bc07c59c812144f7b0",class:o.title},a("slot",{key:"ce4fc19e7bcd801e789fa920b75726ac2e6d64fa",name:"label"}),a("slot",{key:"6493bed9d3ff025212c6ddd483c6afc66e4e2555",name:"annotation"})),a("span",{key:"86bb4f277aa23a921803d1b15b19ddc1f9bef788",class:o.right},a("slot",{key:"6125404df4e25f638b3c0a2dc10d13cc58d5a2db",name:"suffix"}),a("span",{key:"4ec7fde2af7b5648b033440a646af0fa9cdb575a",class:o.arrow},a("slot",{key:"cf5ace176c8c7cd53e8bad7c8155e396d37ca6fa",name:"toggle-icon"},a("gov-icon",{key:"0d5e06a98c5ac069c3680ed5442064aed996eb46",name:"chevron-down",type:"components"}))))),a("div",{key:"6ce82f8da04142d8330f9da035f046272deffd4d",class:o.content},a("slot",{key:"47790abbe664864a3cf1d456762fb414d7c63418"}))))}async toggle(){this.open=!this.open;this.govChange.emit({open:this.open,component:o.root,ref:this.host})}async currentState(){return this.open}get host(){return c(this)}static get watchers(){return{size:["validateSize"]}}};export{l as gov_accordion_item};
//# sourceMappingURL=p-820eb0fb.entry.js.map