import{j as f}from"./tanstack-1.0.74-aU0azVkW.js";import{l as t,r as O,di as j,dh as k,dj as F,dg as K,al as _}from"./lib-1.0.74-B5IEqfHg.js";import{T as S}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 V=({columnName:i,columnValue:b,columnInitialValue:N,columnMetaData:x,storeColumn:p,columnValidation:e,onColumnChange:w,metaData:T,storeForm:a,formMode:g,locale:L,columnEvents:r})=>{t.debug(i,b,N,x,p,e,T,a,g,L);const y=O(b),R=Number(p.maxLength)<1||Number(p.maxLength)>x.character_maximum_length||isNaN(Number(p.maxLength))?x.character_maximum_length:Number(p.maxLength),C=e!=null&&e.error?e==null?void 0:e.text:L.enterMultiLineText+" ("+R+")";return f.jsx(S,{error:e==null?void 0:e.error,id:i,label:x.formLabel,value:y,required:x.is_nullable==="NO",multiline:!0,minRows:p.minRows,maxRows:p.maxRows,slotProps:{htmlInput:{maxLength:R,readOnly:K(T,x,p,g)}},className:F(p),helperText:k(p,C),variant:j(),onChange:h=>{let U=h.target.value;h.target.value===""&&(g===_.INSERT||g===_.UPDATE&&a.preserveSpacesOnUpdate===!1||a.preserveSpacesOnUpdate===!0&&N!=="")&&(U=null),w(i,U)},onInvalid:h=>{h.preventDefault()},sx:{"& textarea":{textAlign:p.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{V as default};
