import{j as a}from"./tanstack-1.0.74-aU0azVkW.js";import{e as y}from"./utils-1.0.74-7xWhx9mc.js";import{l as c,d5 as D}from"./lib-1.0.74-B5IEqfHg.js";import{u as g}from"./useLocaleDayJs-1.0.74-CZZRM8Tp.js";import{d as i}from"./dayjs.min-1.0.74-DSE__uTX.js";import{L as k}from"./useMobilePicker-1.0.74-BBJYmeTF.js";import{A as w}from"./AdapterDayjs-1.0.74-BRyHMPx_.js";import{T as Y}from"./TimePicker-1.0.74-gWV6OwNg.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"./timeViewRenderers-1.0.74-DXJAb_je.js";import"./MenuItem-1.0.74-D9LDbFUb.js";const mr=({value:o,setValue:p,setButtons:s,saveChanges:d,cancel:l,locale:t,language:e,columnState:m})=>{c.debug(o);const n=i(),{getDateLocale:f,dayjsIsLoading:u}=g(e);return u?null:a.jsx(k,{dateAdapter:w,adapterLocale:m.localize?f(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"}):d():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:D(m)}}})})};export{mr as default};
