import{gH as m,iv as v,fj as x,fz as T,fH as h}from"./strapi-ye6TfKul.js";const R=["years","months","days","hours","minutes","seconds"],y=m.forwardRef(({timestamp:t,customIntervals:o=[],...a},i)=>{const{formatRelativeTime:c,formatDate:l,formatTime:f}=v(),e=x({start:t,end:Date.now()}),r=R.find(s=>e[s]>0&&Object.keys(e).includes(s)),u=T(t)?-e[r]:e[r],n=o.find(s=>e[s.unit]<s.threshold),d=n?n.text:c(u,r,{numeric:"auto"});return h.jsx("time",{ref:i,dateTime:t.toISOString(),role:"time",title:`${l(t)} ${f(t)}`,...a,children:d})});export{y as R};
