import{r as o,c as i,h as t,g as e}from"./p-a6030c6e.js";const r='.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-surface-3, #CFCFCF);-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)}';const s=r;const n=class{constructor(t){o(this,t);this.bdsToggle=i(this,"bdsToggle",7);this.bdsAccordionOpen=i(this,"bdsAccordionOpen",7);this.bdsAccordionClose=i(this,"bdsAccordionClose",7);this.accGroup=null;this.accheaders=null;this.accBodies=null;this.isOpen=false;this.numberElement=null;this.condition=false;this.startOpen=false}async toggle(){this.isOpen=!this.isOpen;this.bdsToggle.emit({value:this.isOpen})}async open(){this.isOpen=true}async close(){var o,i;(o=this.accheaders)===null||o===void 0?void 0:o.close();(i=this.accBodies)===null||i===void 0?void 0:i.close();this.isOpen=false}async notStart(){this.startOpen=false}async reciveNumber(o){this.numberElement=o}isOpenChanged(o){var i,t,e,r,s,n,a;if(this.accGroup.collapse=="single"&&this.condition===false){(i=this.accheaders)===null||i===void 0?void 0:i.toggle();(t=this.accBodies)===null||t===void 0?void 0:t.toggle();(e=this.accGroup)===null||e===void 0?void 0:e.closeAll(this.numberElement)}else{if(o){(r=this.accheaders)===null||r===void 0?void 0:r.open();(s=this.accBodies)===null||s===void 0?void 0:s.open();this.bdsAccordionOpen.emit()}else{(n=this.accheaders)===null||n===void 0?void 0:n.close();(a=this.accBodies)===null||a===void 0?void 0:a.close();this.bdsAccordionClose.emit()}}this.condition=false}componentWillLoad(){this.accGroup=this.element.parentElement.tagName=="BDS-ACCORDION-GROUP"&&this.element.parentElement;this.accheaders=this.element.children[0];this.accBodies=this.element.children[1];if(this.startOpen===true){this.condition=true;this.isOpen=true}}render(){return t("div",{key:"378cf81b05db9911774a1ed4279e6242acf63f27",class:"accordion_group"},t("slot",{key:"546baa2f62e1190d0611dff9067c027701d22899"}))}get element(){return e(this)}static get watchers(){return{isOpen:["isOpenChanged"]}}};n.style=s;export{n as bds_accordion};
//# sourceMappingURL=p-54411ad5.entry.js.map