// Module ID: 14359 // Function ID: 14360 // Name: getGiftRowDisplayInfo // Dependencies: [1236, 3622, 5962, 2337, 2] // Exports: formatGiftDate, getGiftRowDisplayInfo, getGiftSubtext // Module 14359 (getGiftRowDisplayInfo) import set from "set" /* 2 */; import getSystemLocale from "getSystemLocale" /* 1236 */; import messagesProxyDefault from "messagesProxy" /* 2337 */; import _mod3622 from "module_3622" /* 3622 */; import formatSingleCurrencyPrice from "formatSingleCurrencyPrice" /* 5962 */; const result = set.fileFinishedImporting("modules/parent_tools/FamilyCenterActivityGiftRowUtils.tsx"); export const getGiftRowDisplayInfo = function getGiftRowDisplayInfo(giftInfo) { return { skuId: giftInfo.sku_id, subscriptionPlanId: giftInfo.subscription_plan_id, price: giftInfo.price, gifterUserId: giftInfo.gifter_user_id, claimed: giftInfo.claimed, offeredAt: giftInfo.offered_at, claimedAt: giftInfo.claimed_at }; }; export const formatGiftDate = function formatGiftDate(claimedAt) { const dateTimeFormat = new Intl.DateTimeFormat(getSystemLocale.intl.currentLocale, { month: "short", day: "numeric" }); return dateTimeFormat.format(_mod3622.parseISO(claimedAt)); }; export const getGiftSubtext = function getGiftSubtext(claimed) { ({ price, gifterName, offeredAt, claimedAt } = claimed); let formatPriceResult = null; if (null != price) { let obj = formatSingleCurrencyPrice; formatPriceResult = obj.formatPrice(price.amount, price.currency); } if (null != formatPriceResult) { if (null != gifterName) { const intl = getSystemLocale.intl; obj = { price: null, username: null }; obj[0] = formatPriceResult; obj[1] = gifterName; let formatToPlainStringResult = intl.formatToPlainString(messagesProxyDefault["o44n/1"], obj); } const items = [formatToPlainStringResult, ]; const intl2 = getSystemLocale.intl; const formatToPlainString = intl2.formatToPlainString; const tmp11 = messagesProxyDefault; if (claimed.claimed) { if (claimedAt == null) { claimedAt = offeredAt; } obj = { date: null }; const _Intl2 = Intl; const dateTimeFormat = new Intl.DateTimeFormat(tmp8(1236).intl.currentLocale, { month: "short", day: "numeric" }); let tmp8Result = tmp8(3622); obj[0] = dateTimeFormat.format(tmp8Result.parseISO(claimedAt)); let formatToPlainStringResult1 = formatToPlainString(tmp11.kDyllq, obj); } else { obj1 = { date: null }; const _Intl = Intl; const dateTimeFormat1 = new Intl.DateTimeFormat(tmp8(1236).intl.currentLocale, { month: "short", day: "numeric" }); tmp8Result = tmp8(3622); obj1[0] = dateTimeFormat1.format(tmp8Result.parseISO(offeredAt)); formatToPlainStringResult1 = formatToPlainString(tmp11.gAG45y, obj1); } items[1] = formatToPlainStringResult1; const _Boolean = Boolean; const found = items.filter(Boolean); return found.join(" \u2022 "); } formatToPlainStringResult = null; if (null != formatPriceResult) { formatToPlainStringResult = formatPriceResult; } };