import{j as o}from"./cm-1.0.63-CSIRHMXC.js";import{P}from"./react-number-format.es-1.0.63-B-GknBUR.js";import{l as j,cJ as s,cL as w,cK as A,bJ as g,bI as y}from"./lib-1.0.63-DJZPtMem.js";import{a as B}from"./hooks-1.0.63-CWs3kTdT.js";import{T as D}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 m=({appId:a,columnName:p,columnValue:F,columnMetaData:e,storeColumn:i,columnValidation:b,onColumnChange:T,metaData:d,storeForm:O,formMode:h,locale:f,language:C,columnEvents:r})=>{j.debug(a,p,F,e,i,b,d,O,h,f,C);const x=B(),K={readOnly:s(d,e,i,h)};return o.jsx(P,{customInput:D,error:b==null?void 0:b.error,label:e.formLabel,value:F??"",required:e.is_nullable==="NO",slotProps:{htmlInput:K},className:i.classNames,helperText:A(i,f.enterTime),variant:w(),onValueChange:({value:t})=>{if(t===""&&e.is_nullable!=="NO")T(p,null),x(g({appId:a,columnName:p,columnError:!1,columnText:"",columnType:y.FORM}));else{T(p,(t+"000000").substring(0,6));let R=t.substring(2,3),k=t.substring(4,5);Number(R)>5||Number(k)>5?x(g({appId:a,columnName:p,columnError:!0,columnText:f.mandatoryField,columnType:y.FORM})):x(g({appId:a,columnName:p,columnError:!1,columnText:"",columnType:y.FORM}))}},onInvalid:t=>{t.preventDefault()},prefix:(i==null?void 0:i.prefix)??"",sx:{"& input":{textAlign:i.alignment}},format:"##:##:##",placeholder:"00:00:00",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{m as default};
