import{a7 as e,a8 as s,a9 as t,aa as n,ab as a,ac as r,f as o,_ as c,p as i,h,S as u,ad as d}from"./backend-ai-webui-c13f73fb.js";function l(r,o){const c=r.queryGroup(),i=c.indexOf(r),h=function(e,r,o){if(0==e.length)return null;switch(o){case a:case n:return r+1>e.length-1?0:r+1;case t:case s:return r-1<0?e.length-1:r-1}return null}(c,i,o.code);if(null!=h){const s=c[h];r.rowToElement(s),e(o)}}class p extends r{constructor(){super(...arguments),this.role="radio",this.formElementType="radio"}queryGroup(){return null!=this.name?u(this,`${this.nodeName.toLowerCase()}[name=${this.name}]:not([disabled])`):[]}rowToElement(e){e.click(),e.focus()}toggle(){this.checked=!0,this.dispatchChangeEvent()}updateTabindex(e){(e.has("disabled")||e.has("checked"))&&d(this,this.disabled||!this.checked&&this.isGroupedChecked()),e.has("checked")&&this.checked&&this.uncheckGroup()}isGroupedChecked(){return null!=this.queryGroup().find((e=>e.checked))}uncheckGroup(){const e=this.queryGroup();for(const s of e)s!==this&&(s.checked=!1,s.tabIndex=-1)}onKeyDown(e){super.onKeyDown(e),l(this,e)}}p.styles=[...r.styles,o("")],c([i({type:String,reflect:!0}),h("design:type",String)],p.prototype,"role",void 0);export{p as R,l as r};
