import{r as t,c as r,h as s,H as e,g as a}from"./p-afb110dc.js";const o=class{constructor(s){t(this,s),this.balChange=r(this,"balChange",7),this.interface="radio",this.inverted=!1,this.value="",this.onClick=t=>{const r=t.target&&t.target.closest("bal-radio");if(r&&!r.disabled){const t=r.value;t!==this.value&&(this.value=t)}}}valueChanged(t,r){t!==r&&(this.sync(),this.balChange.emit(t))}componentWillLoad(){this.sync()}get children(){return Array.from(this.element.querySelectorAll("bal-radio"))}sync(){this.children.forEach(t=>{t.interface=this.interface,t.inverted=this.inverted,t.checked=t.value===this.value})}render(){return s(e,{role:"radiogroup",onClick:this.onClick,class:"bal-"+this.interface},s("slot",null))}get element(){return a(this)}static get watchers(){return{value:["valueChanged"]}}};o.style="@-webkit-keyframes spinAround{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spinAround{from{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.sc-bal-radio-group-h{display:inline-block;position:relative}.bal-select-button.sc-bal-radio-group-h{display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;border:1px solid #d3dbeb;border-radius:100px;padding:5px}";export{o as bal_radio_group}