import{cF as I,cG as A,f as C,cI as E,r as h,cJ as P,j as r,cL as L,T as S,cH as c,cM as j}from"./index-5768b108.js";import{u as $,F as w}from"./useFormControl-e91ce3d1.js";function z(t){return I("MuiInputAdornment",t)}const F=A("MuiInputAdornment",["root","filled","standard","outlined","positionStart","positionEnd","disablePointerEvents","hiddenLabel","sizeSmall"]),f=F;var b;const R=(t,n)=>{const{ownerState:e}=t;return[n.root,n[`position${c(e.position)}`],e.disablePointerEvents===!0&&n.disablePointerEvents,n[e.variant]]},M=t=>{const{classes:n,disablePointerEvents:e,hiddenLabel:a,position:s,size:i,variant:l}=t,p={root:["root",e&&"disablePointerEvents",s&&`position${c(s)}`,l,a&&"hiddenLabel",i&&`size${c(i)}`]};return j(p,z,n)},T=C("div",{name:"MuiInputAdornment",slot:"Root",overridesResolver:R})(E(({theme:t})=>({display:"flex",maxHeight:"2em",alignItems:"center",whiteSpace:"nowrap",color:(t.vars||t).palette.action.active,variants:[{props:{variant:"filled"},style:{[`&.${f.positionStart}&:not(.${f.hiddenLabel})`]:{marginTop:16}}},{props:{position:"start"},style:{marginRight:8}},{props:{position:"end"},style:{marginLeft:8}},{props:{disablePointerEvents:!0},style:{pointerEvents:"none"}}]}))),U=h.forwardRef(function(n,e){const a=P({props:n,name:"MuiInputAdornment"}),{children:s,className:i,component:l="div",disablePointerEvents:p=!1,disableTypography:x=!1,position:m,variant:u,...g}=a,o=$()||{};let d=u;u&&o.variant,o&&!d&&(d=o.variant);const v={...a,hiddenLabel:o.hiddenLabel,size:o.size,disablePointerEvents:p,position:m,variant:d},y=M(v);return r.jsx(w.Provider,{value:null,children:r.jsx(T,{as:l,ownerState:v,className:L(y.root,i),ref:e,...g,children:typeof s=="string"&&!x?r.jsx(S,{color:"textSecondary",children:s}):r.jsxs(h.Fragment,{children:[m==="start"?b||(b=r.jsx("span",{className:"notranslate","aria-hidden":!0,children:"​"})):null,s]})})})}),B=U;export{B as I};
