import{r as t,h as e,a as o}from"./p-e97fde0a.js";const s=':host{display:block;--toggle-spacing:0}::slotted(*){margin-bottom:var(--toggle-spacing)}::slotted(:not(:first-child):not([style*="display: none"])){border-top:1px solid var(--sc-input-border-color)}';const i=s;const l=class{constructor(e){t(this,e);this.accordion=false;this.collapsible=true;this.theme="default"}getToggles(){var t,e,o;let s=this.el.shadowRoot.querySelector("slot");if(!s)return;return((o=(e=(t=s===null||s===void 0?void 0:s.assignedNodes)===null||t===void 0?void 0:t.call(s))===null||e===void 0?void 0:e.filter)===null||o===void 0?void 0:o.call(e,(t=>t.nodeName==="SC-TOGGLE")))||[]}handleShowChange(t){if(t.target.tagName!=="SC-TOGGLE")return;if(this.accordion){this.getToggles().map((e=>e.open=t.target===e))}}handleCollapibleChange(){this.getToggles().map((t=>t.collapsible=this.collapsible))}componentDidLoad(){this.handleCollapibleChange();const t=this.getToggles();if((t===null||t===void 0?void 0:t.length)&&!t.some((t=>t.open))){t[0].open=true}}render(){const t="container"===this.theme?"sc-card":"div";return e(t,{key:"05d5b80055c4f33a643c8b094a07abfafa8a916a",class:{toggles:true,[`toggles--theme-${this.theme}`]:true},part:"base","no-padding":true},e("slot",{key:"33f26ee9c2bc78f949b63d753b17a22e26657194"}))}get el(){return o(this)}static get watchers(){return{collapsible:["handleCollapibleChange"]}}};l.style=i;export{l as sc_toggles};
//# sourceMappingURL=p-a6eaf93e.entry.js.map