/* Metro module 7258; source: modules/premium/hooks/usePremiumDiscountOffer.android.tsx; dependencies: [5140, 1880, 7259, 5143, 632, 2] */ import IAPStoreAndroid from '../../../stores/native/IAPStore.android.tsx'; /* Metro dependency 5140 */ import UseDiscountOffer from './useDiscountOffer.tsx'; /* Metro dependency 7259 */ import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as UseStateFromStoresModule from '../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */ import * as PremiumConstantsModule from '../PremiumConstants.tsx'; /* Metro dependency 1880 */ import * as ProductIdsAndroidModule from '../native/ProductIds.android.tsx'; /* Metro dependency 5143 */ function _fun58304(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#58304, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7436:6, offset: 0x016c4642, size: 168 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/premium/hooks/usePremiumDiscountOffer.android.tsx'); exports.usePremiumDiscountOffer = usePremiumDiscountOffer; exports.usePremiumGroupDiscountOffer = function() { return null; }; function useGetDiscountOffer(a0, a1) { // fn#58305, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7436:240, offset: 0x016c46ea, size: 128 bytes, params: 3, frame: 17 const env0_0 = a1; const value2 = (UseDiscountOffer)(a0); const Object = global.Object; const values = Object.values; const DiscountIdToProductOfferId = (ProductIdsAndroidModule).DiscountIdToProductOfferId; const value = Reflect.apply(values, Object, [DiscountIdToProductOfferId[a0]]); const length = value.length; const value3 = null; return length === 0 ? value3 : value.every(function(a0) { return require.has(a0); }) ? value2 : value3; } function usePremiumDiscountOffer() { // fn#58307, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7436:518, offset: 0x016c476a, size: 97 bytes, params: 1, frame: 15 const useStateFromStoresObject = UseStateFromStoresModule.useStateFromStoresObject; const offerIds = Reflect.apply(useStateFromStoresObject, UseStateFromStoresModule, [[IAPStoreAndroid], function() { var object = {}; var iapStoreAndroidBinding = IAPStoreAndroid; object.isFetchingProducts = iapStoreAndroidBinding.isFetchingProducts(); object.offerIds = iapStoreAndroidBinding.getOfferIds(); return object; }]).offerIds; return useGetDiscountOffer(PREMIUM_TIER_2_LIKELIHOOD_1_MONTH_40_PERCENT_DISCOUNT_ID, offerIds) ?? useGetDiscountOffer(PREMIUM_TIER_2_REENGAGEMENT_1_MONTH_40_PERCENT_DISCOUNT_ID, offerIds); } } global.__d(_fun58304, 7258, [5140, 1880, 7259, 5143, 632, 2]) /* metro module 7258, dependencies: [5140, 1880, 7259, 5143, 632, 2] */;