const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Column-1.0.63-j02lEL6P.js","./cmJson-1.0.63-CyZ2MfFg.js","./cm-1.0.63-CSIRHMXC.js","./redux-1.0.63-Df-eBzJn.js","./vendor-1.0.63-CN03Eozo.js","./lib-1.0.63-DJZPtMem.js","./loglevel-1.0.63-BZ7XahX3.js","./lodash-1.0.63-hMxolcpJ.js","./moment-1.0.63-C5S46NFB.js","./rehyperaw-1.0.63-AkovKNCK.js","./markdown-1.0.63-BJvkzZkj.js","./ActionsDml-1.0.63-nhbCczlS.js","./RestApi-1.0.63-BUfzocgq.js","./hooks-1.0.63-CWs3kTdT.js","./useAppFunctions-1.0.63-DX15IlIH.js","./useMetadata-1.0.63-SO3BYgAj.js","./TargetEnum-1.0.63-CIW1jlU5.js","./index-1.0.63-CrdGWoQq.js","./Autocomplete-1.0.63-pp6oOzlN.js","./Typography-1.0.63-mecuj_Wl.js","./Select-1.0.63-BMejr8a7.js","./Menu-1.0.63-DLh4HkF0.js","./ThemeProvider-1.0.63-Cq0KMgkh.js","./useEnhancedEffect-1.0.63-DnR0ZFqV.js","./index-1.0.63-oIDff4nA.js","./ButtonBase-1.0.63-CF10PFMS.js","./Modal-1.0.63-fMXTbfks.js","./notistack-1.0.63-B49ULGrj.js","./iconBase-1.0.63-CFvHhC4t.js","./createSvgIcon-1.0.63-DWL3J-DK.js","./Close-1.0.63-Dvbopfj5.js","./Chip-1.0.63-QLWMq6MQ.js","./TextField-1.0.63-C35Mfi1Q.js"])))=>i.map(i=>d[i]);
import{_ as L}from"./cmJson-1.0.63-CyZ2MfFg.js";import{j as a}from"./cm-1.0.63-CSIRHMXC.js";import{r as b}from"./redux-1.0.63-Df-eBzJn.js";import{l as i,bZ as w,g as y,bz as d,bK as A}from"./lib-1.0.63-DJZPtMem.js";import{u as f,a as v}from"./hooks-1.0.63-CWs3kTdT.js";import{u as S}from"./useTableSettings-1.0.63-DOq9cogk.js";import{a as z}from"./SharedContainer-1.0.63-BGBqroWN.js";import{u as B}from"./useFormColumns-1.0.63-DJyJ0Ho_.js";import{u as P}from"./useChartSettings-1.0.63-BMkc1WeB.js";import{B as U}from"./Spinner-1.0.63-zcgIyS7Z.js";import"./vendor-1.0.63-CN03Eozo.js";import"./rehyperaw-1.0.63-AkovKNCK.js";import"./markdown-1.0.63-BJvkzZkj.js";import"./loglevel-1.0.63-BZ7XahX3.js";import"./lodash-1.0.63-hMxolcpJ.js";import"./moment-1.0.63-C5S46NFB.js";import"./AdminTheme-1.0.63-DhJ0rrw5.js";import"./Typography-1.0.63-mecuj_Wl.js";import"./ActionsDml-1.0.63-nhbCczlS.js";import"./RestApi-1.0.63-BUfzocgq.js";import"./notistack-1.0.63-B49ULGrj.js";import"./useAppFunctions-1.0.63-DX15IlIH.js";import"./useMetadata-1.0.63-SO3BYgAj.js";import"./useStoreFormSettings-1.0.63-CruqV90e.js";import"./useRemoveAppFromStore-1.0.63-DNpeLtWd.js";import"./Languages-1.0.63-DsTK0dJK.js";import"./AppTheme-1.0.63-CLc-SnB5.js";import"./index-1.0.63-BT4mpIxR.js";import"./getThemeProps-1.0.63-5ZzcWe3G.js";import"./useEnhancedEffect-1.0.63-DnR0ZFqV.js";import"./useScreenSize-1.0.63-DVLFV7fE.js";import"./cjs-1.0.63-4A2xol4v.js";import"./ButtonBase-1.0.63-CF10PFMS.js";import"./index-1.0.63-CrdGWoQq.js";import"./dayjs.min-1.0.63--tEOvUER.js";import"./index-1.0.63-oIDff4nA.js";import"./ThemeProvider-1.0.63-Cq0KMgkh.js";import"./Modal-1.0.63-fMXTbfks.js";import"./iconBase-1.0.63-CFvHhC4t.js";import"./dompurify-1.0.63-DhD2mIk-.js";import"./useFormDetails-1.0.63-B2jPpIRk.js";import"./DynamicModeEnum-1.0.63-BXuL5kgA.js";import"./StoreTypeEnum-1.0.63-Cbd7XZ4r.js";import"./FallbackSpinner-1.0.63-BLl5ldYH.js";import"./main-1.0.63.js";import"./useLocaleUd-1.0.63-CjhlhnHj.js";const K=r=>{const s=f(u=>{var m,l;return((l=(m=u.forms[r])==null?void 0:m.state)==null?void 0:l.validation)??{}});return i.debug("rowValidation",s),s},O=r=>{const s=f(u=>{var m;return(m=u.forms[r])==null?void 0:m.context});return i.debug("context",s),s},X=b.lazy(()=>L(()=>import("./Column-1.0.63-j02lEL6P.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32]),import.meta.url)),zo=({appId:r,metaData:s,formMode:u,formSettings:m,language:l})=>{i.debug(s,u,m,l);const _=v(),n=B(r),C=P(r),E=K(r),F=z(r),T=S(r),g=O(r),h=b.useMemo(()=>n.map(t=>t.columnName),[n]),R=(t,o)=>{i.debug(t,o),_(A({appId:r,columnName:t,columnValue:o}))},V={label:"",type:w.TEXT,expression:""};i.debug(V);const j=(t,o)=>(i.debug(t,o),null),x=(t,o,p)=>(i.debug(t,o,p),a.jsx(b.Suspense,{children:a.jsx(U,{sx:{display:"grid",padding:"0"},children:a.jsx(X,{appId:r,columnName:o,columnMetaData:p,storeColumn:n[t],columnValidation:E[o],onColumnChange:R,metaData:s,context:g,storeTable:T,storeForm:m,formMode:u,locale:C,language:l},o+t)})},o+t));return a.jsx(a.Fragment,{children:h.map((t,o)=>{if(n[o].computedField!==void 0)return j(n,o);const p=y(s,t);if(p===void 0)return null;const e={...p},c=((e==null?void 0:e.is_nullable)??"").toUpperCase()!=="YES";return n[o].more&&!F&&!(u===d.INSERT&&c)||e.column_name&&u===d.INSERT&&c&&!n[o].visible&&(e.column_default!==null||e.column_default!=="NULL"||e.column_default!==""||n[o].defaultValue!==null||n[o].defaultValue!=="")?null:e.column_name&&(n[o].visible===!0||u===d.INSERT&&c&&(e.extra??"")!=="auto_increment"&&(m==null?void 0:m.remoteAutoIncrementColumn)!==e.column_name)?(e.formLabel=n[o].columnLabel,x(o,t,e)):null})})};export{zo as default};
