"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }"use client";
var _chunkY5DBGKQOcjs = require('./chunk-Y5DBGKQO.cjs');var _chunkIW3D5V6Lcjs = require('./chunk-IW3D5V6L.cjs');var _chunk5KRCPBZRcjs = require('./chunk-5KRCPBZR.cjs');var _chunk5NXYDZPPcjs = require('./chunk-5NXYDZPP.cjs');var _react = require('react');var _clsx = require('clsx'); var _clsx2 = _interopRequireDefault(_clsx);function V({endAdornment:n,ref:l,startAdornment:p}){let a=e=>e&&_react.isValidElement.call(void 0, e)?_react.cloneElement.call(void 0, e,{...e.props,onClick:e.props.onClick||(()=>_optionalChain([l, 'access', _ => _.current, 'optionalAccess', _2 => _2.focus, 'call', _3 => _3()]))}):e;return{endAdornment:a(n),startAdornment:a(p)}}var _jsxruntime = require('react/jsx-runtime');var W=_react.forwardRef.call(void 0, (n,l)=>{let{className:p,endAdornment:a,fullWidth:e,id:s,infoText:A,label:d,loading:m,loadingColorType:k,loadingWidthOverride:w,placeholder:I,rtl:E,startAdornment:B,variant:F,warning:H,...i}=n,N=F||"body1",M=w||"100%",c=_react.useRef.call(void 0, null),{disabled:U,error:j,focused:$,getInputProps:q,getRootProps:z}=_chunkIW3D5V6Lcjs.b.call(void 0, {...n,inputRef:c}),R=q(),D=_chunk5KRCPBZRcjs.i.call(void 0, l,R.ref),r=_chunkY5DBGKQOcjs.a.call(void 0, {disabled:U,error:j,focused:$,fullWidth:e,loading:m,noLabel:!d,placeholder:I,rtl:E,shrinkLabel:!!m,value:_optionalChain([c, 'access', _4 => _4.current, 'optionalAccess', _5 => _5.value])||i.defaultValue||i.value,warning:H}),{endAdornment:S,startAdornment:x}=V({endAdornment:a,ref:c,startAdornment:B});return _jsxruntime.jsxs.call(void 0, _chunkY5DBGKQOcjs.e,{className:_clsx2.default.call(void 0, p,r.root),children:[_jsxruntime.jsxs.call(void 0, _chunkY5DBGKQOcjs.f,{...z(),className:_clsx2.default.call(void 0, r.wrapper),children:[x&&_jsxruntime.jsx.call(void 0, _chunk5NXYDZPPcjs.s,{className:_clsx2.default.call(void 0, r.startAdornment),children:x}),_jsxruntime.jsxs.call(void 0, _chunkY5DBGKQOcjs.g,{className:_clsx2.default.call(void 0, r.inner),children:[d&&_jsxruntime.jsx.call(void 0, _chunkY5DBGKQOcjs.h,{className:_clsx2.default.call(void 0, r.label),htmlFor:s,id:s&&`${s}-label`,children:d}),m?_jsxruntime.jsx.call(void 0, _chunkY5DBGKQOcjs.k,{colorType:k,fontVariant:N,widthOverride:M}):_jsxruntime.jsx.call(void 0, _chunkY5DBGKQOcjs.i,{...i,...R,className:_clsx2.default.call(void 0, r.input),id:s,placeholder:I,ref:D,variant:N})]}),S&&_jsxruntime.jsx.call(void 0, _chunk5NXYDZPPcjs.s,{className:_clsx2.default.call(void 0, r.endAdornment),children:S})]}),A&&_jsxruntime.jsx.call(void 0, _chunkY5DBGKQOcjs.j,{className:_clsx2.default.call(void 0, r.infoText),children:A})]})});W.displayName="Input";var X=W;exports.a = X;
