"use strict";const M=require("./mergeProps-DD8aR8go.cjs.js"),S=require("./filterDOMProps-AbzzCIX-.cjs.js"),E=require("./useFormReset-SdZC5b5k.cjs.js"),V=require("./useControlledState-DLAEsTLd.cjs.js"),s=require("react"),D=require("./useField-DOT9H5ld.cjs.js"),R=require("./useFocusable-HmbZyg7l.cjs.js"),c=require("./useFormValidation-B8CXjzeH.cjs.js");function O(e,a){let{inputElementType:f="input",isDisabled:$=!1,isRequired:o=!1,isReadOnly:b=!1,type:v="text",validationBehavior:r="aria"}=e,[t,l]=V.$458b0a5536c1a7cf$export$40bfa8c7b0832715(e.value,e.defaultValue||"",e.onChange),{focusableProps:m}=R.$f645667febf57a63$export$4c014de7c8940b4c(e,a),d=c.$e5be200c675c3b3a$export$fc1a364ae1f3ff10({...e,value:t}),{isInvalid:i,validationErrors:u,validationDetails:C}=d.displayValidation,{labelProps:P,fieldProps:g,descriptionProps:h,errorMessageProps:y}=D.$2baaea4c71418dea$export$294aa081a6c6f55d({...e,isInvalid:i,errorMessage:e.errorMessage||u}),x=S.$65484d02dcb7eb3e$export$457c3d6518dd4c6f(e,{labelable:!0});const q={type:v,pattern:e.pattern};let[I]=s.useState(t);var n;return E.$99facab73266f662$export$5add1d006293d136(a,(n=e.defaultValue)!==null&&n!==void 0?n:I,l),c.$e93e671b31057976$export$b8473d3665f3a75a(e,d,a),{labelProps:P,inputProps:M.$3ef42575df84b30b$export$9d1611c77c2fe928(x,f==="input"?q:void 0,{disabled:$,readOnly:b,required:o&&r==="native","aria-required":o&&r==="aria"||void 0,"aria-invalid":i||void 0,"aria-errormessage":e["aria-errormessage"],"aria-activedescendant":e["aria-activedescendant"],"aria-autocomplete":e["aria-autocomplete"],"aria-haspopup":e["aria-haspopup"],"aria-controls":e["aria-controls"],value:t,onChange:p=>l(p.target.value),autoComplete:e.autoComplete,autoCapitalize:e.autoCapitalize,maxLength:e.maxLength,minLength:e.minLength,name:e.name,form:e.form,placeholder:e.placeholder,inputMode:e.inputMode,autoCorrect:e.autoCorrect,spellCheck:e.spellCheck,[parseInt(s.version,10)>=17?"enterKeyHint":"enterkeyhint"]:e.enterKeyHint,onCopy:e.onCopy,onCut:e.onCut,onPaste:e.onPaste,onCompositionEnd:e.onCompositionEnd,onCompositionStart:e.onCompositionStart,onCompositionUpdate:e.onCompositionUpdate,onSelect:e.onSelect,onBeforeInput:e.onBeforeInput,onInput:e.onInput,...m,...g}),descriptionProps:h,errorMessageProps:y,isInvalid:i,validationErrors:u,validationDetails:C}}exports.$2d73ec29415bd339$export$712718f7aec83d5=O;
//# sourceMappingURL=useTextField-xUsOzG8r.cjs.js.map
