var __awaiter=this&&this.__awaiter||function(o,e,t,r){function n(o){return o instanceof t?o:new t((function(e){e(o)}))}return new(t||(t=Promise))((function(t,i){function c(o){try{s(r.next(o))}catch(e){i(e)}}function a(o){try{s(r["throw"](o))}catch(e){i(e)}}function s(o){o.done?t(o.value):n(o.value).then(c,a)}s((r=r.apply(o,e||[])).next())}))};var __generator=this&&this.__generator||function(o,e){var t={label:0,sent:function(){if(i[0]&1)throw i[1];return i[1]},trys:[],ops:[]},r,n,i,c;return c={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(c[Symbol.iterator]=function(){return this}),c;function a(o){return function(e){return s([o,e])}}function s(a){if(r)throw new TypeError("Generator is already executing.");while(c&&(c=0,a[0]&&(t=0)),t)try{if(r=1,n&&(i=a[0]&2?n["return"]:a[0]?n["throw"]||((i=n["return"])&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;if(n=0,i)a=[a[0]&2,i.value];switch(a[0]){case 0:case 1:i=a;break;case 4:t.label++;return{value:a[1],done:false};case 5:t.label++;n=a[1];a=[0];continue;case 7:a=t.ops.pop();t.trys.pop();continue;default:if(!(i=t.trys,i=i.length>0&&i[i.length-1])&&(a[0]===6||a[0]===2)){t=0;continue}if(a[0]===3&&(!i||a[1]>i[0]&&a[1]<i[3])){t.label=a[1];break}if(a[0]===6&&t.label<i[1]){t.label=i[1];i=a;break}if(i&&t.label<i[2]){t.label=i[2];t.ops.push(a);break}if(i[2])t.ops.pop();t.trys.pop();continue}a=e.call(o,t)}catch(s){a=[6,s];n=0}finally{r=i=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,g as getElement}from"./index-611fd21e.js";var accordionCss='.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)}';var AccordionGroup=function(){function o(o){registerInstance(this,o);this.bdsAccordionCloseAll=createEvent(this,"bdsAccordionCloseAll",7);this.bdsAccordionOpenAll=createEvent(this,"bdsAccordionOpenAll",7);this.accordionsElement=null;this.collapse="single"}o.prototype.closeAll=function(o){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){this.bdsAccordionCloseAll.emit();for(e=0;e<this.accordionsElement.length;e++){if(this.collapse!="multiple"){if(o!=e)this.accordionsElement[e].close()}else{this.accordionsElement[e].close()}}return[2]}))}))};o.prototype.openAll=function(o){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){this.bdsAccordionOpenAll.emit();for(e=0;e<this.accordionsElement.length;e++){if(this.collapse!="multiple"){if(o!=e)this.accordionsElement[e].open()}else{this.accordionsElement[e].open()}}return[2]}))}))};o.prototype.componentWillRender=function(){this.accordionsElement=this.element.getElementsByTagName("bds-accordion");for(var o=0;o<this.accordionsElement.length;o++){this.accordionsElement[o].reciveNumber(o)}};o.prototype.render=function(){return h("div",{class:"accordion_group"},h("slot",null))};Object.defineProperty(o.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();AccordionGroup.style=accordionCss;export{AccordionGroup as bds_accordion_group};