import{a as s,j as n}from"./vendor-query-B2UbickB.js";import{z as p,x as f}from"./index-BZu5zewH.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 x=new Date(r).getTime(),i=o?new Date(o).getTime():l,t=Math.max(0,i-x),a=p(t),m=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:m,children:n.jsx("span",{className:`text-xs ${e?"text-status-active":"text-text-tertiary"}`,children:a})})}export{D as E};
//# sourceMappingURL=ElapsedCell-8lk94nZt.js.map
