import{r as e,c as t,h as s,H as a,g as i}from"./p-a6030c6e.js";const r=class{constructor(s){e(this,s);this.bdsRadioGroupChange=t(this,"bdsRadioGroupChange",7);this.radioGroupElement=null;this.chagedOptions=(e,t)=>{if(t.detail.checked==true){this.value=e}};this.value=undefined}valueChanged(e){this.setSelectedRadio(e);this.bdsRadioGroupChange.emit({value:e})}componentWillRender(){this.radioGroupElement=this.element.getElementsByTagName("bds-radio");for(let e=0;e<this.radioGroupElement.length;e++){this.radioGroupElement[e].addEventListener("bdsChange",(t=>this.chagedOptions(this.radioGroupElement[e].value,t)))}}setSelectedRadio(e){const t=this.radioGroupElement;for(let s=0;s<t.length;s++){const a=t[s].value;t[s].checked=false;if(t[s].checked==false&&e==a){t[s].checked=true}}}render(){return s(a,{key:"aff49c3636e83c921b3362ccd2226c94a3dde664"},s("slot",{key:"b4b8b668ec286f40530d1258bc68347de06a4a36"}))}get element(){return i(this)}static get watchers(){return{value:["valueChanged"]}}};export{r as bds_radio_group};
//# sourceMappingURL=p-04a17b8b.entry.js.map