import{j as o}from"./index-3141de2d.js";import{C}from"./index.esm-8b0c9a99.js";import{F,b,a as g}from"./TextField-ec161c03.js";import{R,a as f}from"./RadioGroup-646433d5.js";import{F as h}from"./FormControlLabel-c4983ca8.js";const H=({control:t,name:u,label:x,options:p,defaultValue:d,row:i,helperText:a,containerSx:j,onChange:s,...c})=>o.jsx(C,{control:t,name:u,defaultValue:d??"",render:({field:l,fieldState:e})=>{var m,n;return o.jsxs(F,{component:"fieldset",error:!!e.error,sx:j,children:[o.jsx(b,{component:"legend",children:x}),o.jsx(R,{...l,...c,row:i,onChange:r=>{l.onChange(r.target.value),s&&s(r)},children:p.map(r=>o.jsx(h,{value:r.value,control:o.jsx(f,{...r.radioProps}),label:r.label},r.value))}),(a||((m=e.error)==null?void 0:m.message))&&o.jsx(g,{children:((n=e.error)==null?void 0:n.message)||a})]})}});export{H as C};
