import{j as m}from"./cm-1.0.63-CSIRHMXC.js";import{r as u}from"./redux-1.0.63-Df-eBzJn.js";import{f as x}from"./tab-1.0.63-Dmjvx_Wl.js";import{l as d,o as c}from"./lib-1.0.63-DJZPtMem.js";import{T as f}from"./TextField-1.0.63-C35Mfi1Q.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 L=({value:r,columnState:p,columnMetaData:e,setValue:s,cancel:n,setButtons:o})=>{d.debug(r,e);const l=c(r),[i,a]=u.useState(!1);return m.jsx("div",{onClick:t=>{t.stopPropagation()},children:m.jsx(f,{className:"pp-inline-editing pp-textarea",value:l,required:e.is_nullable==="NO",multiline:!0,minRows:i?5:1,maxRows:i?7:1,slotProps:{htmlInput:{maxLength:e.character_maximum_length}},variant:"outlined",onChange:t=>{s(t.target.value===""?null:t.target.value)},onKeyDown:t=>{t.key==="Escape"&&n()},onFocus:()=>{o(!0),a(!0)},onBlur:()=>{setTimeout(()=>{o(!1),a(!1)},200)},sx:x(p,!0)})})};export{L as default};
