import{r as t,c as s,h as i,g as o}from"./p-c87337b7.js";const h=class{constructor(i){t(this,i),this.smoothlyAccordionItemDidLoad=s(this,"smoothlyAccordionItemDidLoad",7),this.smoothlyAccordionItemDidUnload=s(this,"smoothlyAccordionItemDidUnload",7),this.smoothlyOpen=s(this,"smoothlyOpen",7),this.smoothlyClose=s(this,"smoothlyClose",7)}openChanged(t){this.open=t,t&&this.smoothlyOpen.emit({open:!0,name:this.name})}componentDidLoad(){const t=this.me.getElementsByTagName("summary");if(t.length>0){const s=t=>{this.open?this.smoothlyClose.emit({open:this.open,name:this.name}):this.open=!0,t.preventDefault()};t[0].addEventListener("click",s),t[0].addEventListener("touch",s)}this.smoothlyAccordionItemDidLoad.emit()}componentDidUnload(){this.smoothlyAccordionItemDidUnload.emit()}render(){return i("details",{open:this.open},i("summary",null,i("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},i("path",this.open?{d:"M256 48C141.6 48 48 141.6 48 256s93.6 208 208 208 208-93.6 208-208S370.4 48 256 48zm-42.7 318.9L106.7 260.3l29.9-29.9 76.8 76.8 162.1-162.1 29.9 29.9-192.1 191.9z"}:{d:"M256 48C141.601 48 48 141.601 48 256s93.601 208 208 208 208-93.601 208-208S370.399 48 256 48zm0 374.399c-91.518 0-166.399-74.882-166.399-166.399S164.482 89.6 256 89.6 422.4 164.482 422.4 256 347.518 422.399 256 422.399z"})),this.name,"string"==typeof this.brand?i("span",{class:this.brand.toLowerCase()},this.brand):Array.isArray(this.brand)?this.brand.map(t=>i("span",{class:t.toLowerCase()},t)):[]),i("fieldset",{disabled:!this.open,name:this.name},i("slot",null)))}get me(){return o(this)}static get watchers(){return{open:["openChanged"]}}static get style(){return".sc-smoothly-accordion-item-h{display:block}[hidden].sc-smoothly-accordion-item-h{display:none}details.sc-smoothly-accordion-item{padding:0}details.sc-smoothly-accordion-item > summary.sc-smoothly-accordion-item > span.sc-smoothly-accordion-item{float:right;margin:.2em;font-size:60%}details.sc-smoothly-accordion-item > summary.sc-smoothly-accordion-item{font-size:120%;list-style-type:none;cursor:pointer;padding:.4em;color:rgb(var(--smoothly-text-tint))}details.sc-smoothly-accordion-item > fieldset.sc-smoothly-accordion-item{border:none;margin:0;padding:0}[open].sc-smoothly-accordion-item-h > details.sc-smoothly-accordion-item > summary.sc-smoothly-accordion-item{color:rgb(var(--smoothly-primary-contrast));background:rgb(var(--smoothly-primary-color))}details.sc-smoothly-accordion-item > summary.sc-smoothly-accordion-item::-webkit-details-marker{display:none}details.sc-smoothly-accordion-item > summary.sc-smoothly-accordion-item > svg.sc-smoothly-accordion-item{width:1em;height:auto;margin-bottom:-.2em;margin-right:.4em}[open].sc-smoothly-accordion-item-h > details.sc-smoothly-accordion-item > summary.sc-smoothly-accordion-item > svg.sc-smoothly-accordion-item{fill:rgb(var(--smoothly-primary-contrast))}.sc-smoothly-accordion-item-h:not([open]) > details.sc-smoothly-accordion-item > summary.sc-smoothly-accordion-item > svg.sc-smoothly-accordion-item{fill:rgb(var(--smoothly-text-tint))}"}};export{h as smoothly_accordion_item};