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