/* Metro module 13417; source: modules/parent_tools/FamilyCenterActivityGiftRowUtils.tsx; dependencies: [1244, 3381, 5137, 2224, 2] */ function _fun102085(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13607:6, offset: 0x0222bd2e, size: 135 bytes, params: 8, frame: 18 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const closure = formatGiftDate; (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/parent_tools/FamilyCenterActivityGiftRowUtils.tsx'); exports.getGiftRowDisplayInfo = function(a0) { return {skuId: a0.sku_id, subscriptionPlanId: a0.subscription_plan_id, price: a0.price, gifterUserId: a0.gifter_user_id, claimed: a0.claimed, offeredAt: a0.offered_at, claimedAt: a0.claimed_at}; }; exports.formatGiftDate = closure; exports.getGiftSubtext = getGiftSubtext; } function formatGiftDate(a0) { // fn#102086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13607:111, offset: 0x0222bdb5, size: 121 bytes, params: 2, frame: 16 const Intl = global.Intl; const DateTimeFormat = Intl.DateTimeFormat; const dateTimeFormat = new DateTimeFormat((require(1244) /* metro dependency 1244: indexNative */).intl.currentLocale, {'month': 'short', 'day': 'numeric'}); const format = dateTimeFormat.format; const moduleValue = require(3381) /* metro dependency 3381 */; return Reflect.apply(format, dateTimeFormat, [moduleValue.parseISO(a0)]); } function getGiftSubtext({claimed, price, gifterName, offeredAt, claimedAt}) { // fn#102088, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13607:560, offset: 0x0222be83, size: 361 bytes, params: 2, frame: 22 var r8; var r0; var moduleValue; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; var gAG45y; var object4; var kDyllq; var object5; let value = null; if (value != price) { moduleValue = require(5137) /* metro dependency 5137: PriceUtils */; r8 = moduleValue.formatPrice(price.amount, price.currency); } else { r8 = value; } const items = [value == r8 ? value != r8 ? r8 : value : value != gifterName ? intl.formatToPlainString((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['o44n/1'], {price: r8, username: gifterName}) : value != r8 ? r8 : value]; const formatToPlainString = intl.formatToPlainString; const defaultImport = importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */; if (claimed) { kDyllq = defaultImport.kDyllq; object5 = {}; object5.date = formatGiftDate(value == claimedAt ? offeredAt : claimedAt); value = Reflect.apply(formatToPlainString, intl, [kDyllq, object5]); r0 = value; } else { gAG45y = defaultImport.gAG45y; object4 = {}; object4.date = formatGiftDate(offeredAt); r0 = Reflect.apply(formatToPlainString, intl, [gAG45y, object4]); } items[1] = r0; const filter = items.filter; const Boolean = global.Boolean; return Reflect.apply(filter, items, [Boolean]).join(' • '); }