import{v as f,w as v,t as d,z as u,r as h,x as G,y as b,G as R,H as y,f as n,D as g,E as k,J as i,K as p}from"./index.8f299a7d.js";import{F as C}from"./FormControlLabel.4a0a74ee.js";import{C as F}from"./Checkbox.8fe02966.js";function M(o){return f("MuiFormGroup",o)}v("MuiFormGroup",["root","row","error"]);const S=["className","row"],U=o=>{const{classes:e,row:s,error:r}=o;return k({root:["root",s&&"row",r&&"error"]},M,e)},D=d("div",{name:"MuiFormGroup",slot:"Root",overridesResolver:(o,e)=>{const{ownerState:s}=o;return[e.root,s.row&&e.row]}})(({ownerState:o})=>u({display:"flex",flexDirection:"column",flexWrap:"wrap"},o.row&&{flexDirection:"row"})),H=h.exports.forwardRef(function(e,s){const r=G({props:e,name:"MuiFormGroup"}),{className:a,row:c=!1}=r,t=b(r,S),l=R(),w=y({props:r,muiFormControl:l,states:["error"]}),m=u({},r,{row:c,error:w.error}),x=U(m);return n(D,u({className:g(x.root,a),ownerState:m,ref:s},t))}),N=H;function P({name:o,...e}){const{control:s}=i();return n(C,{control:n(p,{name:o,control:s,render:({field:r})=>n(F,{...r,checked:r.value})}),...e})}function W({name:o,options:e,...s}){const{control:r}=i();return n(p,{name:o,control:r,render:({field:a})=>{const c=t=>a.value.includes(t.value)?a.value.filter(l=>l!==t.value):[...a.value,t.value];return n(N,{children:e.map((t,l)=>n(C,{control:n(F,{checked:a.value.includes(t.value),onChange:()=>a.onChange(c(t))}),label:t.label,...s},l))})}})}export{P as R,W as a};
