"use strict";var t=require("@babel/runtime/helpers/defineProperty"),e=require("@babel/runtime/helpers/objectWithoutProperties"),r=require("react/jsx-runtime"),n=require("@material-ui/core"),o=require("./effects/index.js"),i=require("../../config/theme/palette.mjs.js");function u(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var s=u(t),a=u(e),c=["startIcon","endIcon","onFocus","onBlur","InputProps","value","startAdornment","endAdornment"];function l(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function p(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?l(Object(r),!0).forEach((function(e){s.default(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):l(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var f=n.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:i.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(t){var e=t.startIcon,i=t.endIcon,u=t.onFocus,s=t.onBlur,l=t.InputProps,d=t.value,m=void 0===d?"":d,b=t.startAdornment,I=t.endAdornment,O=a.default(t,c),v=o.useCustomShrink({startIcon:e,endIcon:i,onFocus:u,onBlur:s,value:m,InputProps:l}),g=v.shrink,h=v.onInputFocus,j=v.onInputBlur,A=v.startLabelOffset,L=v.endLabelOffset,M=v.startAdornmentRef,P=v.endAdornmentRef,y=f({startLabelOffset:A,endLabelOffset:L});return r.jsx(n.TextField,p(p({},O),{},{variant:O.variant,onFocus:h,onBlur:j,value:m,classes:{root:y.textField},InputLabelProps:p({shrink:g,classes:{shrink:y.shrunkLabel}},t.InputLabelProps),InputProps:p({startAdornment:e?r.jsx(n.InputAdornment,{position:"start",ref:M,children:e}):b,endAdornment:i?r.jsx(n.InputAdornment,{position:"end",ref:P,children:i}):I},t.InputProps)}))};
//# sourceMappingURL=index.js.map
