import{r as o,j as e,C as m}from"./index-Db5TLbgN.js";import{u as c,a as d,r as l}from"./index-CB_FsW6Y.js";function h(){const a=c(),{value:s,loading:r}=d(a,Math.round(Date.now()/1e3)),i=o.useMemo(()=>{var t;if(!(r||s.length===0||!a)){for(let n=0;n<s.length;n++)if(s[n].user.id===((t=a.currentUser)==null?void 0:t.id))return s[n+1];return s[0]}},[a,s,r]);return i?e.jsx("div",{className:"next-box",children:e.jsxs("div",{className:"next-user",children:[e.jsxs("div",{className:"content",children:[e.jsx("div",{className:"avatar",children:e.jsx("img",{className:"main",src:m.absoluteUrl("assets/images/user.svg")})}),e.jsx("div",{className:"info",children:e.jsxs("div",{className:"name",children:[i.user.name," "]})})]}),e.jsx("div",{className:"time-range",children:e.jsxs("div",{children:["使用时间段：",l(i.startTime)," -",l(i.endTime,{from:i.startTime})]})}),e.jsx("div",{className:"title",children:"下一预约"})]})}):null}export{h as default};
