"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _utils = require('@baseapp-frontend/utils');var _luxon = require('luxon');var M=function(a){if(!a)return"";var r=_luxon.DateTime.fromISO(a);if(!r.isValid)return"";if(_utils.isToday.call(void 0, a))return _utils.formatDateFromApi.call(void 0, a,{toFormat:_utils.TIME_FORMAT[2]});if(_utils.isYesterday.call(void 0, 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"):_utils.formatDateFromApi.call(void 0, a,{toFormat:_utils.DATE_FORMAT[2]})};exports.a = M;
//# sourceMappingURL=chunk-4O6FQ6U5.js.map