import{j as L}from"./tanstack-1.0.74-aU0azVkW.js";import{l as S,r as N,di as R,dh as A,dg as B,dj as I,al as k}from"./lib-1.0.74-B5IEqfHg.js";import{T as P}from"./TextField-1.0.74-BW9Byijb.js";import"./redux-1.0.74-D8bIc6ki.js";import"./vendor-1.0.74-CN03Eozo.js";import"./utils-1.0.74-7xWhx9mc.js";import"./CircularProgress-1.0.74-QfwfRJ7i.js";import"./ButtonBase-1.0.74-W6tAH7AI.js";import"./Typography-1.0.74-B4mhsevh.js";import"./useEnhancedEffect-1.0.74-B56M26dS.js";import"./Select-1.0.74-DHOnlEEH.js";import"./Menu-1.0.74-CdjCBJ4R.js";import"./ThemeProvider-1.0.74-4uzbYYLM.js";import"./index-1.0.74-DxwH6OqZ.js";import"./Portal-1.0.74-BrUPeMX9.js";import"./iconBase-1.0.74-Cs0vntJu.js";import"./isHostComponent-1.0.74-DVu5iVWx.js";import"./Modal-1.0.74-BfLid1bk.js";import"./createSvgIcon-1.0.74-Cw_ZFbxi.js";const E=({columnName:i,columnValue:y,columnInitialValue:T,columnMetaData:p,storeColumn:g,columnValidation:e,onColumnChange:w,metaData:U,storeForm:h,formMode:x,locale:_,columnEvents:r})=>{var f,O;S.debug(i,y,T,p,g,e,U,h,x,_);const F=N(y),b=((f=p==null?void 0:p.column_type)==null?void 0:f.toLowerCase())==="geometry"||((O=p==null?void 0:p.column_type)==null?void 0:O.toLowerCase())==="point",K=e!=null&&e.error?e==null?void 0:e.text:b?"":_.enterText+" ("+p.character_maximum_length+")";return L.jsx(P,{error:e==null?void 0:e.error,label:p.formLabel,value:F,required:p.is_nullable==="NO",className:I(g),slotProps:{input:{},htmlInput:{maxLength:p.character_maximum_length,readOnly:B(U,p,g,x)||b}},helperText:A(g,K),variant:R(),onChange:C=>{let j=C.target.value;C.target.value===""&&(x===k.INSERT||x===k.UPDATE&&h.preserveSpacesOnUpdate===!1||h.preserveSpacesOnUpdate===!0&&T!=="")&&(j=null),w(i,j)},onInvalid:C=>{C.preventDefault()},sx:{"& input":{textAlign:g.alignment}},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{E as default};
