import{c as x,_ as v,b as i,s as b,d as F,e as L,f as y,w as C,x as t}from"./OdysseyThemeProvider-Bh0Bu-2o.js";import{r as q}from"./index-NdkWRN8K.js";import{u as k,f as R}from"./useFormControl-BMISTZuX.js";import{j as m}from"./jsx-runtime-CnH95YSl.js";const j=["children","className","color","component","disabled","error","filled","focused","required"],$=r=>{const{classes:o,color:c,focused:s,disabled:d,error:a,filled:l,required:n}=r,p={root:["root",`color${L(c)}`,d&&"disabled",a&&"error",l&&"filled",s&&"focused",n&&"required"],asterisk:["asterisk",a&&"error"]};return y(p,C,o)},g=b("label",{name:"MuiFormLabel",slot:"Root",overridesResolver:({ownerState:r},o)=>i({},o.root,r.color==="secondary"&&o.colorSecondary,r.filled&&o.filled)})(({theme:r,ownerState:o})=>i({color:(r.vars||r).palette.text.secondary},r.typography.body1,{lineHeight:"1.4375em",padding:0,position:"relative",[`&.${t.focused}`]:{color:(r.vars||r).palette[o.color].main},[`&.${t.disabled}`]:{color:(r.vars||r).palette.text.disabled},[`&.${t.error}`]:{color:(r.vars||r).palette.error.main}})),N=b("span",{name:"MuiFormLabel",slot:"Asterisk",overridesResolver:(r,o)=>o.asterisk})(({theme:r})=>({[`&.${t.error}`]:{color:(r.vars||r).palette.error.main}})),E=q.forwardRef(function(o,c){const s=x({props:o,name:"MuiFormLabel"}),{children:d,className:a,component:l="label"}=s,n=v(s,j),p=k(),e=R({props:s,muiFormControl:p,states:["color","required","focused","disabled","error","filled"]}),u=i({},s,{color:e.color||"primary",component:l,disabled:e.disabled,error:e.error,filled:e.filled,focused:e.focused,required:e.required}),f=$(u);return m.jsxs(g,i({as:l,ownerState:u,className:F(f.root,a),ref:c},n,{children:[d,e.required&&m.jsxs(N,{ownerState:u,"aria-hidden":!0,className:f.asterisk,children:[" ","*"]})]}))});export{E as F};
