"use strict";var t=require('./../../ext-esm/tslib/tslib.es6.js'),n=require("react/jsx-runtime"),e=require("@material-ui/core"),r=require("./effects/index.js"),o=require("../../config/theme/palette.mjs.js"),s=e.makeStyles((function(t){return{textField:{marginTop:16,marginBottom:8,"& .MuiFormLabel-root":{marginLeft:function(t){return t.startLabelOffset?"".concat(t.startLabelOffset+8,"px"):0},marginRight:function(t){return t.endLabelOffset?"".concat(t.endLabelOffset+8,"px"):0}},"&:hover":{"&.MuiTextField-root .MuiInput-root":{"& .MuiInputAdornment-root svg.MuiSvgIcon-root":{fill:o.primary.contrastText}}},"&.MuiTextField-root .MuiInput-root":{"& .MuiInputAdornment-root svg.MuiSvgIcon-root":{width:16,height:16,fontSize:16,fill:"#DADADA"},"&.Mui-error .MuiInputAdornment-root svg.MuiSvgIcon-root":{fill:"".concat(t.palette.error.main," !important")}},"& .Mui-focused .MuiInputAdornment-root svg.MuiSvgIcon-root":{fill:"".concat(t.palette.primary.main," !important")}},shrunkLabel:{"&.MuiInputLabel-shrink.MuiFormLabel-root":{marginLeft:0}}}}));module.exports=function(o){var i=o.startIcon,u=o.endIcon,a=o.onFocus,l=o.onBlur,d=o.InputProps,c=o.value,p=void 0===c?"":c,m=o.startAdornment,f=o.endAdornment,I=t.__rest(o,["startIcon","endIcon","onFocus","onBlur","InputProps","value","startAdornment","endAdornment"]),g=r.useCustomShrink({startIcon:i,endIcon:u,onFocus:a,onBlur:l,value:p,InputProps:d}),v=g.shrink,b=g.onInputFocus,A=g.onInputBlur,L=g.startLabelOffset,M=g.endLabelOffset,h=g.startAdornmentRef,x=g.endAdornmentRef,_=s({startLabelOffset:L,endLabelOffset:M});return n.jsx(e.TextField,t.__assign({},I,{variant:I.variant,onFocus:b,onBlur:A,value:p,classes:{root:_.textField},InputLabelProps:t.__assign({shrink:v,classes:{shrink:_.shrunkLabel}},o.InputLabelProps),InputProps:t.__assign({startAdornment:i?n.jsx(e.InputAdornment,t.__assign({position:"start",ref:h},{children:i})):m,endAdornment:u?n.jsx(e.InputAdornment,t.__assign({position:"end",ref:x},{children:u})):f},o.InputProps)}))};
