import{j as a}from"./tanstack-1.0.74-aU0azVkW.js";import{e as u}from"./utils-1.0.74-7xWhx9mc.js";import{l as D,d5 as y}from"./lib-1.0.74-B5IEqfHg.js";import{u as c}from"./useLocaleDayJs-1.0.74-CZZRM8Tp.js";import{d as m}from"./dayjs.min-1.0.74-DSE__uTX.js";import{L as g}from"./useMobilePicker-1.0.74-BBJYmeTF.js";import{A as k}from"./AdapterDayjs-1.0.74-BRyHMPx_.js";import{D as Y}from"./DatePicker-1.0.74-RL6FEWbq.js";import"./redux-1.0.74-D8bIc6ki.js";import"./vendor-1.0.74-CN03Eozo.js";import"./Languages-1.0.74-DaJcF5OJ.js";import"./hooks-1.0.74-NYCTWeI9.js";import"./index-1.0.74-DtMr5-xA.js";import"./ConfirmDialog-1.0.74-CXu4CqK2.js";import"./ButtonBase-1.0.74-W6tAH7AI.js";import"./CircularProgress-1.0.74-QfwfRJ7i.js";import"./Typography-1.0.74-B4mhsevh.js";import"./useEnhancedEffect-1.0.74-B56M26dS.js";import"./AdminTheme-1.0.74-BtTaJUu_.js";import"./Modal-1.0.74-BfLid1bk.js";import"./Portal-1.0.74-BrUPeMX9.js";import"./useThemeProps-1.0.74-eOKEtzB-.js";import"./getThemeProps-1.0.74-DOfDN6_V.js";import"./index-1.0.74-iJ_9eGZx.js";import"./index-1.0.74-DxwH6OqZ.js";import"./ThemeProvider-1.0.74-4uzbYYLM.js";import"./iconBase-1.0.74-Cs0vntJu.js";import"./InputAdornment-1.0.74-DzikPcDx.js";import"./Select-1.0.74-DHOnlEEH.js";import"./Menu-1.0.74-CdjCBJ4R.js";import"./isHostComponent-1.0.74-DVu5iVWx.js";import"./createSvgIcon-1.0.74-Cw_ZFbxi.js";import"./TextField-1.0.74-BW9Byijb.js";import"./visuallyHidden-1.0.74-Dan1xhjv.js";import"./Chip-1.0.74-BR6j83mk.js";import"./dateViewRenderers-1.0.74-2jL9ogDX.js";const ir=({value:o,setValue:p,setButtons:e,saveChanges:n,cancel:d,locale:i,language:s,columnState:t})=>{D.debug(o);const{getDateLocale:l,dayjsIsLoading:f}=c(s);return f?null:a.jsx(g,{dateAdapter:k,adapterLocale:t.localize?l(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:y(t)}}})})};export{ir as default};
