import{v as z,w as E,t as S,M as X,z as i,r as w,y as M,N as Y,G as j,j as D,f as O,D as _,O as v,E as q,x as Z,H as ee,T as U}from"./index.8f299a7d.js";function oe(e){return z("PrivateSwitchBase",e)}E("PrivateSwitchBase",["root","checked","disabled","input","edgeStart","edgeEnd"]);const te=["autoFocus","checked","checkedIcon","className","defaultChecked","disabled","disableFocusRipple","edge","icon","id","inputProps","inputRef","name","onBlur","onChange","onFocus","readOnly","required","tabIndex","type","value"],ae=e=>{const{classes:o,checked:a,disabled:t,edge:l}=e,d={root:["root",a&&"checked",t&&"disabled",l&&`edge${v(l)}`],input:["input"]};return q(d,oe,o)},le=S(X)(({ownerState:e})=>i({padding:9,borderRadius:"50%"},e.edge==="start"&&{marginLeft:e.size==="small"?-3:-12},e.edge==="end"&&{marginRight:e.size==="small"?-3:-12})),se=S("input")({cursor:"inherit",position:"absolute",opacity:0,width:"100%",height:"100%",top:0,left:0,margin:0,padding:0,zIndex:1}),ne=w.exports.forwardRef(function(o,a){const{autoFocus:t,checked:l,checkedIcon:d,className:u,defaultChecked:g,disabled:x,disableFocusRipple:C=!1,edge:k=!1,icon:B,id:b,inputProps:n,inputRef:y,name:L,onBlur:m,onChange:f,onFocus:r,readOnly:p,required:H,tabIndex:W,type:P,value:$}=o,A=M(o,te),[I,G]=Y({controlled:l,default:Boolean(g),name:"SwitchBase",state:"checked"}),c=j(),J=s=>{r&&r(s),c&&c.onFocus&&c.onFocus(s)},K=s=>{m&&m(s),c&&c.onBlur&&c.onBlur(s)},Q=s=>{if(s.nativeEvent.defaultPrevented)return;const T=s.target.checked;G(T),f&&f(s,T)};let h=x;c&&typeof h>"u"&&(h=c.disabled);const V=P==="checkbox"||P==="radio",R=i({},o,{checked:I,disabled:h,disableFocusRipple:C,edge:k}),N=ae(R);return D(le,i({component:"span",className:_(N.root,u),centerRipple:!0,focusRipple:!C,disabled:h,tabIndex:null,role:void 0,onFocus:J,onBlur:K,ownerState:R,ref:a},A,{children:[O(se,i({autoFocus:t,checked:l,defaultChecked:g,className:N.input,disabled:h,id:V&&b,name:L,onChange:Q,readOnly:p,ref:y,required:H,ownerState:R,tabIndex:W,type:P},P==="checkbox"&&$===void 0?{}:{value:$},n)),I?d:B]}))}),me=ne;function re(e){return z("MuiFormControlLabel",e)}const ce=E("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error"]),F=ce,ie=["checked","className","componentsProps","control","disabled","disableTypography","inputRef","label","labelPlacement","name","onChange","value"],de=e=>{const{classes:o,disabled:a,labelPlacement:t,error:l}=e,d={root:["root",a&&"disabled",`labelPlacement${v(t)}`,l&&"error"],label:["label",a&&"disabled"]};return q(d,re,o)},ue=S("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,o)=>{const{ownerState:a}=e;return[{[`& .${F.label}`]:o.label},o.root,o[`labelPlacement${v(a.labelPlacement)}`]]}})(({theme:e,ownerState:o})=>i({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${F.disabled}`]:{cursor:"default"}},o.labelPlacement==="start"&&{flexDirection:"row-reverse",marginLeft:16,marginRight:-11},o.labelPlacement==="top"&&{flexDirection:"column-reverse",marginLeft:16},o.labelPlacement==="bottom"&&{flexDirection:"column",marginLeft:16},{[`& .${F.label}`]:{[`&.${F.disabled}`]:{color:(e.vars||e).palette.text.disabled}}})),pe=w.exports.forwardRef(function(o,a){const t=Z({props:o,name:"MuiFormControlLabel"}),{className:l,componentsProps:d={},control:u,disabled:g,disableTypography:x,label:C,labelPlacement:k="end"}=t,B=M(t,ie),b=j();let n=g;typeof n>"u"&&typeof u.props.disabled<"u"&&(n=u.props.disabled),typeof n>"u"&&b&&(n=b.disabled);const y={disabled:n};["checked","name","onChange","value","inputRef"].forEach(p=>{typeof u.props[p]>"u"&&typeof t[p]<"u"&&(y[p]=t[p])});const L=ee({props:t,muiFormControl:b,states:["error"]}),m=i({},t,{disabled:n,labelPlacement:k,error:L.error}),f=de(m);let r=C;return r!=null&&r.type!==U&&!x&&(r=O(U,i({component:"span",className:f.label},d.typography,{children:r}))),D(ue,i({className:_(f.root,l),ownerState:m,ref:a},B,{children:[w.exports.cloneElement(u,y),r]}))}),fe=pe;export{fe as F,me as S};
