import{d as V,r as f,b as D,o as Y,c as H,f as t,B as s,E as c,a as i,a2 as v,aN as M,H as u,cK as C,at as P,J as U,__tla as j}from"./index-92ad187a.js";import{g as k,c as B,e as E,h as J,i as K,__tla as N}from"./formatTime-c7f253d6.js";let h,O=Promise.all([(()=>{try{return j}catch{}})(),(()=>{try{return N}catch{}})()]).then(async()=>{let d;d={class:"flex flex-row items-center gap-2"},h=V({name:"ShortcutDateRangePicker",__name:"index",emits:["change"],setup(R,{expose:p,emit:x}){const l=f(7),a=f(["",""]);p({times:a});const g=[{text:"\u6628\u5929",value:()=>k(new Date,-1)},{text:"\u6700\u8FD17\u5929",value:()=>B()},{text:"\u672C\u6708",value:()=>[u().startOf("M"),u().subtract(1,"d")]},{text:"\u6700\u8FD130\u5929",value:()=>E()},{text:"\u6700\u8FD11\u5E74",value:()=>J()}],m=async()=>{(function(){const n=u().subtract(l.value,"d"),e=u().subtract(1,"d");a.value=K(n,e)})(),await _()},b=x,_=async()=>{b("change",a.value)};return D(()=>{m()}),(n,e)=>{const o=C,w=P,y=U;return Y(),H("div",d,[t(w,{modelValue:i(l),"onUpdate:modelValue":e[0]||(e[0]=r=>v(l)?l.value=r:null),onChange:m},{default:s(()=>[t(o,{label:1},{default:s(()=>[c("\u6628\u5929")]),_:1}),t(o,{label:7},{default:s(()=>[c("\u6700\u8FD17\u5929")]),_:1}),t(o,{label:30},{default:s(()=>[c("\u6700\u8FD130\u5929")]),_:1})]),_:1},8,["modelValue"]),t(y,{modelValue:i(a),"onUpdate:modelValue":e[1]||(e[1]=r=>v(a)?a.value=r:null),"value-format":"YYYY-MM-DD HH:mm:ss",type:"daterange","start-placeholder":"\u5F00\u59CB\u65E5\u671F","end-placeholder":"\u7ED3\u675F\u65E5\u671F","default-time":[new Date("1 00:00:00"),new Date("1 23:59:59")],shortcuts:g,class:"!w-240px",onChange:_},null,8,["modelValue","default-time"]),M(n.$slots,"default")])}}})});export{h as _,O as __tla};
