import{r as e,h as t,g as s}from"./p-a6030c6e.js";const r=".stepper__container{width:100%;border-radius:8px;-webkit-box-sizing:border-box;box-sizing:border-box;padding:16px;display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.stepper__container ::slotted(bds-step:last-child){-ms-flex:inherit;flex:inherit}.stepper__container__divisor{-ms-flex:1 1 auto;flex:1 1 auto;-ms-flex-item-align:center;align-self:center;height:1.5px;background:var(--color-content-disable, #636363);margin:0px 8px;min-width:24px}.stepper__container__divisor--completed{border-top:2px solid var(--color-primary, #1e6bf1)}";const i=r;const n=class{constructor(t){e(this,t)}connectedCallback(){this.childOptions.forEach(((e,t)=>{e.index=t;if(t===this.childOptions.length-1){e.last=true}}))}componentDidLoad(){this.renderLine()}async setActiveStep(e){this.resetActiveSteps();this.childOptions[e].active=true}async setCompletedStep(e){this.childOptions[e].completed=true}async getActiveStep(){return this.childOptions.find((e=>e.active===true)).index}async resetActiveSteps(){for(const e of this.childOptions){e.active=false}}async resetCompletedSteps(){for(const e of this.childOptions){e.completed=false}}get childOptions(){return Array.from(this.el.querySelectorAll("bds-step"))}renderLine(){const e=document.createElement("div");e.classList.add("stepper__container__divisor");Array.from(this.childOptions).forEach(((t,s)=>{if(this.childOptions.length-1!=s){t.insertAdjacentHTML("afterend",e.outerHTML)}}))}render(){return t("div",{key:"16b7a44d3d4fe50eda93b90608c21acc527de58c",class:"stepper__container"},t("slot",{key:"afee24fc128b408e80aa73533448aa227991303d"}))}get el(){return s(this)}};n.style=i;export{n as bds_stepper};
//# sourceMappingURL=p-2ef47386.entry.js.map