import{r as a}from"./client.58f92968.js";import{j as e,aF as r,aG as o,az as t,d as l,g as i,ae as s,ac as u,h as d,i as n,k as c}from"./App.09743846.js";const f="fui-RadioGroup",m=n({root:{mc9l5x:"f22iagw",Bt984gj:"f6jr5hl"},vertical:{Beiy3e4:"f1vx9l62"}},{d:[".f22iagw{display:flex;}",".f6jr5hl{align-items:flex-start;}",".f1vx9l62{flex-direction:column;}"]}),p=a.exports.forwardRef(((n,p)=>{const v=((a,e)=>{a=o(a);const r=t("radiogroup-"),{name:d=r,value:n,defaultValue:c,disabled:f,layout:m="vertical",onChange:p,required:v}=a;return{layout:m,name:d,value:n,defaultValue:c,disabled:f,required:v,components:{root:"div"},root:{ref:e,role:"radiogroup",...l(i("div",a,["onChange","name"]),{elementType:"div"}),onChange:s((a=>{p&&u(a.target,{constructorName:"HTMLInputElement"})&&"radio"===a.target.type&&p(a,{value:a.target.value})}))}}})(n,p),g=(e=>{const{name:r,value:o,defaultValue:t,disabled:l,layout:i,required:s}=e,u=e.root["aria-describedby"];return{radioGroup:a.exports.useMemo((()=>({name:r,value:o,defaultValue:t,disabled:l,layout:i,required:s,"aria-describedby":u})),[r,o,t,l,i,s,u])}})(v);return(a=>{const e=m();a.root.className=d(f,e.root,"vertical"===a.layout&&e.vertical,a.root.className)})(v),c("useRadioGroupStyles_unstable")(v),((a,o)=>e(r.Provider,{value:o.radioGroup,children:e(a.root,{})}))(v,g)}));p.displayName="RadioGroup";export{p as R};
