import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-2bf16536.js";var RadioGroup=function(){function e(e){var t=this;registerInstance(this,e);this.bdsRadioGroupChange=createEvent(this,"bdsRadioGroupChange",7);this.radioGroupElement=null;this.chagedOptions=function(e,n){if(n.detail.checked==true){t.value=e}};this.value=undefined}e.prototype.valueChanged=function(e){this.setSelectedRadio(e);this.bdsRadioGroupChange.emit({value:e})};e.prototype.componentWillRender=function(){var e=this;this.radioGroupElement=this.element.getElementsByTagName("bds-radio");var t=function(t){n.radioGroupElement[t].addEventListener("bdsChange",(function(n){return e.chagedOptions(e.radioGroupElement[t].value,n)}))};var n=this;for(var r=0;r<this.radioGroupElement.length;r++){t(r)}};e.prototype.setSelectedRadio=function(e){var t=this.radioGroupElement;for(var n=0;n<t.length;n++){var r=t[n].value;t[n].checked=false;if(t[n].checked==false&&e==r){t[n].checked=true}}};e.prototype.render=function(){return h(Host,{key:"aff49c3636e83c921b3362ccd2226c94a3dde664"},h("slot",{key:"b4b8b668ec286f40530d1258bc68347de06a4a36"}))};Object.defineProperty(e.prototype,"element",{get:function(){return getElement(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{value:["valueChanged"]}},enumerable:false,configurable:true});return e}();export{RadioGroup as bds_radio_group};
//# sourceMappingURL=bds-radio-group.entry.js.map