import{a as s,j as n}from"./vendor-query-B2UbickB.js";import{A as p,y as f}from"./index-_BRA9uFL.js";function D({startDate:r,endDate:o,isLive:e}){const[l,c]=s.useState(Date.now);s.useEffect(()=>{if(!e)return;const u=setInterval(()=>c(Date.now()),1e3);return()=>clearInterval(u)},[e]);const i=new Date(r).getTime(),m=o?new Date(o).getTime():l,t=Math.max(0,m-i),a=p(t),x=s.useMemo(()=>[{label:"ms",value:String(t)},{label:"sec",value:`${(t/1e3).toFixed(3)}s`},{label:"text",value:a}],[t,a]);return n.jsx(f,{options:x,children:n.jsx("span",{className:`text-xs ${e?"text-status-active":"text-text-tertiary"}`,children:a})})}export{D as E};
//# sourceMappingURL=ElapsedCell-tcGx5PFI.js.map
