import{r as P}from"./redux-1.0.74-D8bIc6ki.js";import{e as E,g as U,u as A,h as x,f as v,i as L,j as z,m as F}from"./CircularProgress-1.0.74-QfwfRJ7i.js";import{u as B,f as H}from"./Select-1.0.74-DHOnlEEH.js";import{h as I}from"./ButtonBase-1.0.74-W6tAH7AI.js";import{j as m}from"./tanstack-1.0.74-aU0azVkW.js";import{T as y}from"./Typography-1.0.74-B4mhsevh.js";function W(e){return U("MuiFormControlLabel",e)}const l=E("MuiFormControlLabel",["root","labelPlacementStart","labelPlacementTop","labelPlacementBottom","disabled","label","error","required","asterisk"]),G=e=>{const{classes:r,disabled:s,labelPlacement:o,error:d,required:b}=e,u={root:["root",s&&"disabled",`labelPlacement${L(o)}`,d&&"error",b&&"required"],label:["label",s&&"disabled"],asterisk:["asterisk",d&&"error"]};return z(u,W,r)},J=v("label",{name:"MuiFormControlLabel",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:s}=e;return[{[`& .${l.label}`]:r.label},r.root,r[`labelPlacement${L(s.labelPlacement)}`]]}})(F(({theme:e})=>({display:"inline-flex",alignItems:"center",cursor:"pointer",verticalAlign:"middle",WebkitTapHighlightColor:"transparent",marginLeft:-11,marginRight:16,[`&.${l.disabled}`]:{cursor:"default"},[`& .${l.label}`]:{[`&.${l.disabled}`]:{color:(e.vars||e).palette.text.disabled}},variants:[{props:{labelPlacement:"start"},style:{flexDirection:"row-reverse",marginRight:-11}},{props:{labelPlacement:"top"},style:{flexDirection:"column-reverse"}},{props:{labelPlacement:"bottom"},style:{flexDirection:"column"}},{props:({labelPlacement:r})=>r==="start"||r==="top"||r==="bottom",style:{marginLeft:16}}]}))),K=v("span",{name:"MuiFormControlLabel",slot:"Asterisk",overridesResolver:(e,r)=>r.asterisk})(F(({theme:e})=>({[`&.${l.error}`]:{color:(e.vars||e).palette.error.main}}))),se=P.forwardRef(function(r,s){const o=A({props:r,name:"MuiFormControlLabel"}),{checked:d,className:b,componentsProps:u={},control:a,disabled:R,disableTypography:T,inputRef:O,label:j,labelPlacement:k="end",name:Q,onChange:V,required:q,slots:$={},slotProps:w={},value:X,...M}=o,n=B(),g=R??a.props.disabled??(n==null?void 0:n.disabled),f=q??a.props.required,h={disabled:g,required:f};["checked","name","onChange","value","inputRef"].forEach(p=>{typeof a.props[p]>"u"&&typeof o[p]<"u"&&(h[p]=o[p])});const N=H({props:o,muiFormControl:n,states:["error"]}),i={...o,disabled:g,labelPlacement:k,required:f,error:N.error},C=G(i),S={slots:$,slotProps:{...u,...w}},[D,c]=I("typography",{elementType:y,externalForwardedProps:S,ownerState:i});let t=j;return t!=null&&t.type!==y&&!T&&(t=m.jsx(D,{component:"span",...c,className:x(C.label,c==null?void 0:c.className),children:t})),m.jsxs(J,{className:x(C.root,b),ownerState:i,ref:s,...M,children:[P.cloneElement(a,h),f?m.jsxs("div",{children:[t,m.jsxs(K,{ownerState:i,"aria-hidden":!0,className:C.asterisk,children:[" ","*"]})]}):t]})});export{se as F};
