import{r as o,c as t,h as i,g as r}from"./p-93b809e8.js";const e=class{constructor(i){o(this,i),this.bdsToggle=t(this,"bdsToggle",7),this.bdsAccordionOpen=t(this,"bdsAccordionOpen",7),this.bdsAccordionClose=t(this,"bdsAccordionClose",7),this.accGroup=null,this.accheaders=null,this.accBodies=null,this.isOpen=!1,this.numberElement=null,this.condition=!1,this.startOpen=!1}async toggle(){this.isOpen=!this.isOpen,this.bdsToggle.emit({value:this.isOpen})}async open(){this.isOpen=!0}async close(){var o,t;null===(o=this.accheaders)||void 0===o||o.close(),null===(t=this.accBodies)||void 0===t||t.close(),this.isOpen=!1}async notStart(){this.startOpen=!1}async reciveNumber(o){this.numberElement=o}isOpenChanged(o){var t,i,r,e,n,s,a;"single"==this.accGroup.collapse&&!1===this.condition?(null===(t=this.accheaders)||void 0===t||t.toggle(),null===(i=this.accBodies)||void 0===i||i.toggle(),null===(r=this.accGroup)||void 0===r||r.closeAll(this.numberElement)):o?(null===(e=this.accheaders)||void 0===e||e.open(),null===(n=this.accBodies)||void 0===n||n.open(),this.bdsAccordionOpen.emit()):(null===(s=this.accheaders)||void 0===s||s.close(),null===(a=this.accBodies)||void 0===a||a.close(),this.bdsAccordionClose.emit()),this.condition=!1}componentWillLoad(){this.accGroup="BDS-ACCORDION-GROUP"==this.element.parentElement.tagName&&this.element.parentElement,this.accheaders=this.element.children[0],this.accBodies=this.element.children[1],!0===this.startOpen&&(this.condition=!0,this.isOpen=!0)}render(){return i("div",{class:"accordion_group"},i("slot",null))}get element(){return r(this)}static get watchers(){return{isOpen:["isOpenChanged"]}}};e.style='.accordion_header{display:grid;grid-auto-flow:column;gap:24px;-ms-flex-pack:start;justify-content:start;-ms-flex-align:center;align-items:center;padding:24px;padding-right:56px;position:relative;color:var(--color-content-default, #454545);cursor:pointer}.accordion_header::before{content:"";position:absolute;inset:0;z-index:0}.accordion_header *{position:relative;z-index:1}.accordion_header:hover::before{background-color:var(--color-content-default, #454545);opacity:0.08}.accordion_header .accButton{position:absolute;right:24px;top:calc(50% - 16px);border-radius:8px;contain:inherit;-webkit-transition:height 0.5s, all 0.3s;-moz-transition:height 0.5s, all 0.3s;transition:height 0.5s, all 0.3s;z-index:1}.accordion_header .accButton__isopen{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.accordion_header .accButton::before{content:"";position:absolute;inset:-4px;border:2px solid transparent;border-radius:4px}.accordion_header .accButton:focus-visible{outline:none}.accordion_header .accButton:focus-visible::before{border-color:var(--color-focus, #c226fb)}.accordion_header .accButton:hover{background-color:var(--color-surface-1, #f6f6f6)}.accordion_header .accButton:active{background-color:var(--color-surface-1, #f6f6f6)}.accordion_body{height:0;overflow:hidden;border-bottom:1px solid var(--color-border-1, #c9c9c9);-webkit-transition:height 0.5s;-moz-transition:height 0.5s;transition:height 0.5s}.accordion_body::-webkit-scrollbar{width:16px;background-color:transparent}.accordion_body::-webkit-scrollbar-thumb{border-radius:10px;border:4px solid transparent;border-radius:10px;background-clip:content-box;background-color:#b9cbd3}.accordion_body_isOpen{overflow:overlay}.accordion_body .container{padding:8px 24px 48px;position:relative;color:var(--color-content-default, #454545)}';export{e as bds_accordion}