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