import{j as a}from"./cm-1.0.63-CSIRHMXC.js";import{e as y}from"./notistack-1.0.63-B49ULGrj.js";import{f as c}from"./tab-1.0.63-Dmjvx_Wl.js";import{u as D}from"./useLocaleDayJs-1.0.63-CBxbslpm.js";import{d as i}from"./dayjs.min-1.0.63--tEOvUER.js";import{l as g}from"./lib-1.0.63-DJZPtMem.js";import{L as k}from"./useMobilePicker-1.0.63-Dld_IT8N.js";import{A as w}from"./AdapterDayjs-1.0.63-DgbXGDY7.js";import{T as Y}from"./TimePicker-1.0.63-BXoEswsV.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"./timeViewRenderers-1.0.63-Do12J_jG.js";import"./MenuItem-1.0.63-Bvb3IjMP.js";const mr=({value:o,setValue:p,setButtons:s,saveChanges:f,cancel:l,locale:t,language:e,columnState:m})=>{g.debug(o);const n=i(),{getDateLocale:d,dayjsIsLoading:u}=D(e);return u?null:a.jsx(k,{dateAdapter:w,adapterLocale:m.localize?d(e):void 0,children:a.jsx(Y,{format:m.mysqlFormat?"HH:mm:ss":void 0,className:"pp-inline-editing",value:o===null?null:i(n.format("YYYY-MM-DD")+"T"+o),views:["hours","minutes","seconds"],closeOnSelect:!0,onChange:r=>{p(r===null?null:i(r).format("HH:mm:ss"))},slotProps:{textField:{variant:"outlined",onKeyDown:r=>{r.key==="Enter"?o!==null&&!i(n.format("YYYY-MM-DD")+"T"+o).isValid()?y(t==null?void 0:t.invalidTime,{variant:"error"}):f():r.key==="Escape"?l():(r.key==="ArrowUp"||r.key==="ArrowDown"||r.key==="ArrowLeft"||r.key==="ArrowRight")&&r.stopPropagation()},onBlur:()=>{setTimeout(()=>{s(!1)},200)},onFocus:()=>{s(!0)},sx:c(m)}}})})};export{mr as default};
