import{r as e,c as a,h as t,g as s,H as i}from"./p-b31dd0cc.js";class r{constructor(t){e(this,t),this.change=a(this,"change",7)}componentDidLoad(){const e=this.host.querySelector("materials-radio[checked]");this.value=e?e.value:null,this.materialsRadioNodes=Array.from(this.host.querySelectorAll("materials-radio")),this.materialsRadioNodes.forEach(e=>{e.addEventListener("change",e=>this.handleEvent(e))})}handleEvent(e){e.stopPropagation(),this.value=e.detail,this.cleanNeighbors(this.value),this.change.emit(this.value)}cleanNeighbors(e){this.materialsRadioNodes.filter(a=>!e||a.value!==e).forEach(e=>e.checked=!1)}render(){return t(i,{class:{linebreak:this.linebreak}},this.label&&t("span",null,this.label),t("slot",null))}get host(){return s(this)}static get style(){return":host linebreak{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}"}}export{r as materials_radio_group};