import{j as x}from"./cm-1.0.63-CSIRHMXC.js";import{l as k,cJ as S,cS as I,cL as w,cK as A}from"./lib-1.0.63-DJZPtMem.js";import{F as B,I as H,b as O}from"./TextField-1.0.63-C35Mfi1Q.js";import{S as P}from"./Select-1.0.63-BMejr8a7.js";import{M as R}from"./MenuItem-1.0.63-Bvb3IjMP.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"./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=({columnName:t,columnValue:C,columnMetaData:e,storeColumn:i,columnValidation:p,onColumnChange:L,metaData:h,storeForm:b,formMode:j,locale:y,columnEvents:r})=>{k.debug(t,C,e,i,p,h,b,j,y);const s={readOnly:S(h,e,i,j)},K=p!=null&&p.error?p==null?void 0:p.text:y.selectFromList;return x.jsxs(B,{className:I(i),children:[x.jsx(H,{variant:b.fieldVariant,children:e.formLabel}),x.jsx(P,{MenuProps:{id:"pp-select-menu"},error:p==null?void 0:p.error,label:e.formLabel,value:C===null?[]:C.split(","),multiple:!0,inputProps:s,variant:w(),onChange:F=>{const g=F.target.value.join(",");L(t,g!==""?g:null),r!=null&&r.onChange&&r.onChange()},sx:{textAlign:i.alignment},onBlurCapture:r==null?void 0:r.onBlur,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,children:e.column_type.replace("set(","").replace(")","").replaceAll("'","").split(",").map(function(f){return x.jsx(R,{value:f,children:f},f)})}),x.jsx(O,{children:A(i,K)})]})};export{m as default};
