import{j as a}from"./cm-1.0.63-CSIRHMXC.js";import{e as u}from"./notistack-1.0.63-B49ULGrj.js";import{f as D}from"./tab-1.0.63-Dmjvx_Wl.js";import{u as y}from"./useLocaleDayJs-1.0.63-CBxbslpm.js";import{d as m}from"./dayjs.min-1.0.63--tEOvUER.js";import{l as c}from"./lib-1.0.63-DJZPtMem.js";import{L as g}from"./useMobilePicker-1.0.63-Dld_IT8N.js";import{A as k}from"./AdapterDayjs-1.0.63-DgbXGDY7.js";import{D as Y}from"./DatePicker-1.0.63-Clum_pNa.js";import"./redux-1.0.63-Df-eBzJn.js";import"./vendor-1.0.63-CN03Eozo.js";import"./Languages-1.0.63-DsTK0dJK.js";import"./hooks-1.0.63-CWs3kTdT.js";import"./loglevel-1.0.63-BZ7XahX3.js";import"./lodash-1.0.63-hMxolcpJ.js";import"./moment-1.0.63-C5S46NFB.js";import"./InputAdornment-1.0.63-q8tTbJxw.js";import"./cjs-1.0.63-4A2xol4v.js";import"./Typography-1.0.63-mecuj_Wl.js";import"./ButtonBase-1.0.63-CF10PFMS.js";import"./useEnhancedEffect-1.0.63-DnR0ZFqV.js";import"./getThemeProps-1.0.63-5ZzcWe3G.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"./iconBase-1.0.63-CFvHhC4t.js";import"./createSvgIcon-1.0.63-DWL3J-DK.js";import"./index-1.0.63-BT4mpIxR.js";import"./TextField-1.0.63-C35Mfi1Q.js";import"./visuallyHidden-1.0.63-Dan1xhjv.js";import"./DialogContent-1.0.63-B3W-DlSe.js";import"./ListItem-1.0.63-HbRRleqj.js";import"./Chip-1.0.63-QLWMq6MQ.js";import"./dateViewRenderers-1.0.63-CVOdAYL2.js";const ir=({value:o,setValue:p,setButtons:e,saveChanges:n,cancel:d,locale:i,language:s,columnState:t})=>{c.debug(o);const{getDateLocale:f,dayjsIsLoading:l}=y(s);return l?null:a.jsx(g,{dateAdapter:k,adapterLocale:t.localize?f(s):void 0,children:a.jsx(Y,{format:t.mysqlFormat?"YYYY-MM-DD":void 0,className:"pp-inline-editing",value:o?m(o):null,closeOnSelect:!0,onChange:r=>{p(r===null?null:m(r).format("YYYY-MM-DD"))},slotProps:{textField:{variant:"outlined",onKeyDown:r=>{r.key==="Enter"?o!==null&&!m(o).isValid()?u(i==null?void 0:i.invalidDate,{variant:"error"}):n():r.key==="Escape"?d():(r.key==="ArrowUp"||r.key==="ArrowDown"||r.key==="ArrowLeft"||r.key==="ArrowRight")&&r.stopPropagation()},onBlur:()=>{setTimeout(()=>{e(!1)},200)},onFocus:()=>{e(!0)},sx:D(t)}}})})};export{ir as default};
