/* Metro module 10024; source: modules/wishlists/CollectiblesWishlistUtils.tsx; dependencies: [10025, 1904, 1244, 5134, 7630, 2] */ import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as IndexNativeModule from '../../intl/index.native.tsx'; /* Metro dependency 1244 */ import * as CollectiblesItemTypeModule from '../../external/discord_common/js/shared/shared-constants/CollectiblesItemType.tsx'; /* Metro dependency 1904 */ import * as CollectiblesUtilsModule from '../collectibles/CollectiblesUtils.tsx'; /* Metro dependency 5134 */ import * as CollectiblesWishlistItemRecordModule from './records/CollectiblesWishlistItemRecord.tsx'; /* Metro dependency 10025 */ function _fun78295(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#78295, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10210:6, offset: 0x01e24948, size: 156 bytes, params: 8, frame: 18 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/wishlists/CollectiblesWishlistUtils.tsx'); exports.getProductNameAndTypeFromSku = getProductNameAndTypeFromSku; exports.getProductNameAndTypeFromItem = function(a0) { var isCollectiblesWishlistItemRecordBinding = isCollectiblesWishlistItemRecord; var value2 = undefined; return formatProductNameAndType(a0.skuName, isCollectiblesWishlistItemRecordBinding(a0) ? a0.collectiblesItem == null ? value2 : a0.collectiblesItem.type : value2); }; exports.isWishlistableCollectiblesProduct = isWishlistableCollectiblesProduct; function formatProductNameAndType(a0, a1) { // fn#78296, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10210:139, offset: 0x01e249e4, size: 313 bytes, params: 3, frame: 17 const intl = (IndexNativeModule).intl; const t = (IndexNativeModule).t; const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType; const AVATAR_DECORATION = CollectiblesItemType.AVATAR_DECORATION; if (AVATAR_DECORATION === a1) { return intl.formatToPlainString(t.lvBzLi, {product: a0}); } const PROFILE_EFFECT = CollectiblesItemType.PROFILE_EFFECT; if (PROFILE_EFFECT === a1) { return intl.formatToPlainString(t.eR7moP, {product: a0}); } const NAMEPLATE = CollectiblesItemType.NAMEPLATE; if (NAMEPLATE === a1) { return intl.formatToPlainString(t.YFOwHj, {product: a0}); } return a0; } function getProductNameAndTypeFromSku({name, tenantMetadata}) { // fn#78297, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10210:673, offset: 0x01e24b1d, size: 62 bytes, params: 2, frame: 16 return formatProductNameAndType(name, tenantMetadata == null || tenantMetadata.collectibles == null ? undefined : tenantMetadata.collectibles.type); } function isWishlistableCollectiblesProduct(a0) { // fn#78299, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10210:1047, offset: 0x01e24b9c, size: 179 bytes, params: 2, frame: 16 var r2; var r1; var r0; const CollectiblesItemType = (CollectiblesItemTypeModule).CollectiblesItemType; var value3; var value4; var value; const isPremiumCollectiblesProduct2 = (CollectiblesUtilsModule).isPremiumCollectiblesProduct(a0); if (isPremiumCollectiblesProduct2) { r0 = !isPremiumCollectiblesProduct2; } else { value3 = a0.type !== CollectiblesItemType.EXTERNAL_SKU; if (value3) { value4 = a0.type === CollectiblesItemType.PROFILE_FRAME; if (value4) { value = require(7630) /* metro dependency 7630: CollectiblesProfileFrameGiftingExperiment */; value = !value.getIsProfileFrameGiftingEnabled('isWishlistableCollectiblesProduct'); r2 = value; } else { r2 = value4; } value = !r2; r1 = value; } else { r1 = value3; } r0 = r1; } return r0; } } global.__d(_fun78295, 10024, [10025, 1904, 1244, 5134, 7630, 2]) /* metro module 10024, dependencies: [10025, 1904, 1244, 5134, 7630, 2] */;