import"./rolldown-runtime-BM3Ffeng.js";import{N as e,R as t,ot as n,z as r}from"./element-plus-vendor-BF9PNysW.js";import{A as i,D as a,E as o,N as s,O as c,P as l,Pt as u,Tt as d,W as f,Xt as p,bt as m,ct as h,et as g,ht as _,k as v,qt as y,x as b,y as x}from"./vue-vendor-DMUmTARL.js";import{$r as S,ei as C,ti as w}from"./icons-vendor-Db5MGAkr.js";import{b as T,p as E}from"./index-kSn5YXd0.js";import{t as D}from"./_plugin-vue_export-helper-CWyGVBf-.js";var O={key:0,class:`min-w-0 flex-1 truncate text-regular`},k={key:1,class:`min-w-0 flex-1 truncate text-secondary`},A={class:`flex max-h-[85vh] flex-col bg-surface px-4 pb-[calc(0.75rem_+_env(safe-area-inset-bottom))] pt-4`},j={class:`mb-3 flex flex-none items-center justify-between`},M={class:`min-h-0 flex-1 overflow-y-auto`},N={class:`mt-3 flex flex-none gap-3`},P=D(Object.assign({inheritAttrs:!1},{__name:`el-date-picker-plus`,props:{modelValue:{type:Array,default:()=>[]},type:{type:String,default:`date`},rangeSeparator:{type:String,default:`-`},startPlaceholder:{type:String,default:`开始日期`},endPlaceholder:{type:String,default:`结束日期`},valueFormat:{type:String,default:`YYYY-MM-DD HH:mm:ss`},defaultTime:{type:Array,default:()=>T}},emits:[`update:modelValue`],setup(T,{emit:D}){let P=T,F=D,I=o({get:()=>P.modelValue,set:e=>{F(`update:modelValue`,e)}}),L=h(),R=o(()=>{let e=L.shortcuts;return Array.isArray(e)?e:[]}),z=o(()=>L.clearable!==!1),B=d(!1),V=d(null),H=o(()=>!!(P.modelValue?.[0]&&P.modelValue?.[1])),U=e=>typeof e==`string`?e.slice(0,10):``,W=o(()=>U(P.modelValue?.[0])),G=o(()=>U(P.modelValue?.[1])),K=()=>{V.value=H.value?[...P.modelValue]:null,B.value=!0},q=()=>{V.value=null},J=()=>{F(`update:modelValue`,Array.isArray(V.value)?[...V.value]:[]),B.value=!1},Y=()=>{F(`update:modelValue`,[])};return(o,d)=>{let h=t,D=r,P=n,F=e;return u(E)?(g(),c(h,f({key:0},o.$attrs,{modelValue:u(I),"onUpdate:modelValue":d[0]||=e=>m(I)?I.value=e:null,type:`daterange`,"default-time":T.defaultTime,"value-format":T.valueFormat,"range-separator":T.rangeSeparator,"start-placeholder":T.startPlaceholder,"end-placeholder":T.endPlaceholder}),null,16,[`modelValue`,`default-time`,`value-format`,`range-separator`,`start-placeholder`,`end-placeholder`])):(g(),i(b,{key:1},[a(`div`,{class:y([`zf-date-range__trigger flex h-9 w-full cursor-pointer items-center gap-1.5 rounded-lg border-[1.5px] border-border bg-transparent px-3 text-sm transition-colors hover:border-border-dark`,u(L).class]),role:`button`,tabindex:`0`,onClick:K},[l(u(w),{class:`size-4 flex-none text-secondary`}),u(H)?(g(),i(`span`,O,p(u(W))+` `+p(T.rangeSeparator)+` `+p(u(G)),1)):(g(),i(`span`,k,p(T.startPlaceholder)+` `+p(T.rangeSeparator)+` `+p(T.endPlaceholder),1)),u(z)&&u(H)?(g(),c(u(S),{key:2,class:`size-4 flex-none text-secondary transition-colors hover:text-regular`,role:`button`,"aria-label":`清除`,onClick:x(Y,[`stop`])})):v(``,!0)],2),l(F,{modelValue:u(B),"onUpdate:modelValue":d[3]||=e=>m(B)?B.value=e:null,direction:`btt`,"with-header":!1,size:`auto`,"append-to-body":``,class:`zf-date-range__drawer`},{default:_(()=>[a(`div`,A,[a(`div`,j,[d[4]||=a(`span`,{class:`text-base font-bold text-primary dark:text-white`},`选择时间范围`,-1),a(`button`,{type:`button`,class:`flex size-8 items-center justify-center rounded-full bg-page text-secondary dark:bg-white/10 dark:text-gray-400`,"aria-label":`关闭`,onClick:d[1]||=e=>B.value=!1},[l(u(C),{class:`size-5`})])]),a(`div`,M,[l(D,{modelValue:u(V),"onUpdate:modelValue":d[2]||=e=>m(V)?V.value=e:null,type:`daterange`,"value-format":T.valueFormat,"default-time":T.defaultTime,shortcuts:u(R),"show-footer":!1,class:`zf-date-range__panel`},null,8,[`modelValue`,`value-format`,`default-time`,`shortcuts`])]),a(`div`,N,[l(P,{class:`flex-1`,onClick:q},{default:_(()=>[...d[5]||=[s(`清除`,-1)]]),_:1}),l(P,{type:`primary`,class:`flex-1`,onClick:J},{default:_(()=>[...d[6]||=[s(`确定`,-1)]]),_:1})])])]),_:1},8,[`modelValue`])],64))}}}),[[`__scopeId`,`data-v-83c8a2ee`]]);export{P as t};