import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["className","value","defaultValue","onChange","id","name","inputRef","maxLength","disabled","size","view","form","status","onBlur","onFocus","autoFocus","placeholder","leftSide","rightSide","autoComplete","withClearButton","readOnly","type","tabIndex","ariaLabel","iconSize","onClick","onKeyDown","onKeyDownCapture","onKeyUp","onKeyUpCapture","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onClear"];import React,{forwardRef}from"react";import{FieldClearButton,FieldControlLayout,FieldInput,renderSide}from"../../FieldComponents";import{useForkRef}from"../../../hooks/useForkRef";import{useTextField}from"../useTextField";export var TextFieldTypeText=forwardRef(function(a,b){var c=a.className,d=a.value,e=a.defaultValue,f=a.onChange,g=a.id,h=a.name,i=a.inputRef,j=a.maxLength,k=a.disabled,l=a.size,m=void 0===l?"m":l,n=a.view,o=void 0===n?"default":n,p=a.form,q=a.status,r=a.onBlur,s=a.onFocus,t=a.autoFocus,u=a.placeholder,v=a.leftSide,w=a.rightSide,x=a.autoComplete,y=a.withClearButton,z=a.readOnly,A=a.type,B=a.tabIndex,C=a.ariaLabel,D=a.iconSize,E=a.onClick,F=a.onKeyDown,G=a.onKeyDownCapture,H=a.onKeyUp,I=a.onKeyUpCapture,J=a.onCopy,K=a.onCopyCapture,L=a.onCut,M=a.onCutCapture,N=a.onPaste,O=a.onPasteCapture,P=a.onClear,Q=_objectWithoutProperties(a,_excluded),R=useTextField({onClick:E,onChange:f,onBlur:r,onFocus:s,disabled:k,onClear:P}),S=R.handleBlur,T=R.handleChange,U=R.handleClear,V=R.handleFocus,W=R.focused,X=R.withValue,Y=R.ref,Z=R.inputRef,$=R.handleClick;return React.createElement(FieldControlLayout,Object.assign({},Q,{className:c,form:p,status:q,size:m,leftSide:renderSide(v,m,D),rightSide:[y&&!k&&X&&React.createElement(FieldClearButton,{size:m,onClick:U}),renderSide(w,m,D)],focused:W,view:o,ref:useForkRef([b,Y]),disabled:k,onClick:$}),React.createElement(FieldInput,{placeholder:u,autoFocus:t,autoComplete:x,onBlur:S,onChange:T,onFocus:V,defaultValue:e||void 0,value:null===d?"":d,ref:useForkRef([i,Z]),readOnly:z,tabIndex:B,"aria-label":C,onKeyDown:F,onKeyDownCapture:G,onKeyUp:H,onKeyUpCapture:I,maxLength:j,disabled:k,type:A,id:g,name:h,onCopy:J,onCopyCapture:K,onCut:L,onCutCapture:M,onPaste:N,onPasteCapture:O}))});
//# sourceMappingURL=TextFieldTypeText.js.map