import{a5 as C,r,o as b,y as k,q as l,v as m,p as i,P as u,x as c,n as p,s as f,Z as y,l as $,bv as B}from"./index.8d733f79.js";import{E}from"./el-date-picker-panel.089dbe6d.js";import"./panel-time-pick.b2dd8e75.js";import"./index.28f6da25.js";const M={class:"dialog-footer"},Y=C({name:"timePicker"}),U=Object.assign(Y,{emits:["timeChange"],setup(N,{expose:_,emit:g}){const t=r(!1),a=r([]),v=[new Date(2e3,1,1,0,0,0),new Date(2e3,2,1,23,59,59)],D=e=>y(()=>new Date(e).getTime()<new Date().getTime()-2*365*24*60*60*1e3||new Date(e).getTime()>new Date().getTime());function w(e){t.value=!0,a.value=e}const h=()=>{g("timeChange",a.value),n()};function n(){t.value=!1}return _({showModal:w}),(e,o)=>{const T=E,d=$,V=B;return b(),k(V,{title:e.$t("selectTime"),modelValue:p(t),"onUpdate:modelValue":o[1]||(o[1]=s=>f(t)?t.value=s:null),width:"480px",top:"5vh","append-to-body":!0,onClose:n},{footer:l(()=>[m("div",M,[i(d,{onClick:n},{default:l(()=>[u(c(e.$t("cancel")),1)]),_:1}),i(d,{type:"primary",onClick:h},{default:l(()=>[u(c(e.$t("confirm")),1)]),_:1})])]),default:l(()=>[m("div",null,[i(T,{modelValue:p(a),"onUpdate:modelValue":o[0]||(o[0]=s=>f(a)?a.value=s:null),"disabled-date":D,type:"datetimerange","start-placeholder":e.$t("startTime"),"end-placeholder":e.$t("endTime"),"value-format":"YYYY-MM-DD HH:mm:ss",clearable:!1,"default-time":v},null,8,["modelValue","start-placeholder","end-placeholder"])])]),_:1},8,["title","modelValue"])}}});export{U as default};
