"use strict";(self.webpackChunk_surecart_blocks_next=self.webpackChunk_surecart_blocks_next||[]).push([[103],{103:function(e,t,l){l.r(t),l.d(t,{sc_toggles:function(){return s}});var o=l(6892);const s=class{constructor(e){(0,o.r)(this,e),this.accordion=!1,this.collapsible=!0,this.theme="default"}getToggles(){var e,t,l;let o=this.el.shadowRoot.querySelector("slot");if(o)return(null===(l=null===(t=null===(e=null==o?void 0:o.assignedNodes)||void 0===e?void 0:e.call(o))||void 0===t?void 0:t.filter)||void 0===l?void 0:l.call(t,(e=>"SC-TOGGLE"===e.nodeName)))||[]}handleShowChange(e){"SC-TOGGLE"===e.target.tagName&&this.accordion&&this.getToggles().map((t=>t.open=e.target===t))}handleCollapibleChange(){this.getToggles().map((e=>e.collapsible=this.collapsible))}componentDidLoad(){this.handleCollapibleChange();const e=this.getToggles();(null==e?void 0:e.length)&&!e.some((e=>e.open))&&(e[0].open=!0)}render(){const e="container"===this.theme?"sc-card":"div";return(0,o.h)(e,{key:"e3b9dc257461988bd4c21dbc2d39f0f42aaba300",class:{toggles:!0,[`toggles--theme-${this.theme}`]:!0},part:"base","no-padding":!0},(0,o.h)("slot",{key:"0e8c54bca84d3fd0588a498b78cfd60cf3b7052f"}))}get el(){return(0,o.a)(this)}static get watchers(){return{collapsible:["handleCollapibleChange"]}}};s.style=':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)}'}}]);