import{j as z}from"./cm-1.0.63-CSIRHMXC.js";import{N as L}from"./react-number-format.es-1.0.63-B-GknBUR.js";import{l as a,cJ as w,cQ as B,C as H,cL as P,cK as R}from"./lib-1.0.63-DJZPtMem.js";import{T as U}from"./TextField-1.0.63-C35Mfi1Q.js";import"./redux-1.0.63-Df-eBzJn.js";import"./vendor-1.0.63-CN03Eozo.js";import"./loglevel-1.0.63-BZ7XahX3.js";import"./lodash-1.0.63-hMxolcpJ.js";import"./moment-1.0.63-C5S46NFB.js";import"./Typography-1.0.63-mecuj_Wl.js";import"./ButtonBase-1.0.63-CF10PFMS.js";import"./useEnhancedEffect-1.0.63-DnR0ZFqV.js";import"./Select-1.0.63-BMejr8a7.js";import"./Menu-1.0.63-DLh4HkF0.js";import"./ThemeProvider-1.0.63-Cq0KMgkh.js";import"./index-1.0.63-oIDff4nA.js";import"./Modal-1.0.63-fMXTbfks.js";import"./notistack-1.0.63-B49ULGrj.js";import"./iconBase-1.0.63-CFvHhC4t.js";import"./createSvgIcon-1.0.63-DWL3J-DK.js";const u=({appId:K,columnName:S,columnValue:b,columnMetaData:e,storeColumn:p,columnValidation:i,onColumnChange:h,metaData:g,storeForm:y,formMode:I,locale:N,language:f,columnEvents:r})=>{a.debug(K,S,b,e,p,i,g,y,I,N,f);const _=parseInt(e.numeric_precision),F=parseInt(e.numeric_scale),k=e.column_type.includes("unsigned"),O={readOnly:w(g,e,p,I,y)},x=B((f==null?void 0:f.code)??H.defaultLanguage.code),T=i!=null&&i.error?i==null?void 0:i.text:N.enterNumber+(k?" unsigned":"")+" ("+_.toString()+","+F.toString()+")",j=p.localize?((p==null?void 0:p.prefix)??"")+`9${x.thousandSeperator}999${x.decimalSeperator}99`+((p==null?void 0:p.suffix)??""):"";return z.jsx(L,{customInput:U,error:i==null?void 0:i.error,label:e.formLabel,thousandSeparator:p.localize?x.thousandSeperator:void 0,decimalSeparator:p.localize?x.decimalSeperator:void 0,decimalScale:F,value:b??"",required:e.is_nullable==="NO",slotProps:{htmlInput:O},className:p.classNames,helperText:R(p,T),variant:P(),onValueChange:({value:d})=>{d===""&&e.is_nullable!=="NO"?h(S,null):h(S,d)},onInvalid:d=>{d.preventDefault()},prefix:(p==null?void 0:p.prefix)??"",suffix:(p==null?void 0:p.suffix)??"",sx:{"& input":{textAlign:p.alignment}},placeholder:j,onBlurCapture:r==null?void 0:r.onBlur,onChangeCapture:r==null?void 0:r.onChange,onClickCapture:r==null?void 0:r.onClick,onDoubleClickCapture:r==null?void 0:r.onDoubleClick,onFocusCapture:r==null?void 0:r.onFocus,onKeyDownCapture:r==null?void 0:r.onKeyDown,onKeyUpCapture:r==null?void 0:r.onKeyUp})};export{u as default};
