import{DATE_FORMAT as o,TIME_FORMAT as s,formatDateFromApi as e,isToday as i,isYesterday as n}from"@baseapp-frontend/utils";import{DateTime as f}from"luxon";var M=function(a){if(!a)return"";var r=f.fromISO(a);if(!r.isValid)return"";if(i(a))return e(a,{toFormat:s[2]});if(n(a))return"Yesterday";var t=r.diffNow(["years","months","weeks","days"]).toObject();return t.months&&Math.abs(t.months)>0?Math.abs(t.months)>1?"".concat(Math.abs(t.months).toFixed(0)," months ago"):"1 month ago":t.weeks&&Math.abs(t.weeks)>0?Math.abs(t.weeks)>1?"".concat(Math.abs(t.weeks).toFixed(0)," weeks ago"):"1 week ago":t.days&&Math.abs(t.days)>0?"".concat(Math.abs(t.days).toFixed(0)," days ago"):e(a,{toFormat:o[2]})};export{M as a};
//# sourceMappingURL=chunk-TFL6R5VQ.mjs.map