52 lines
3.5 KiB
TypeScript
52 lines
3.5 KiB
TypeScript
/* Metro module 7062; source: modules/premium/hooks/usePremiumTrialOffer.native.tsx; dependencies: [5140, 1880, 7063, 5143, 632, 2] */
|
|
import IAPStoreAndroid from '../../../stores/native/IAPStore.android.tsx'; /* Metro dependency 5140 */
|
|
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 */
|
|
import * as UseTrialOfferModule from '../useTrialOffer.tsx'; /* Metro dependency 7063 */
|
|
|
|
function _fun55988(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55988, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7240:6, offset: 0x013ba7e9, size: 193 bytes, params: 8, frame: 18
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/premium/hooks/usePremiumTrialOffer.native.tsx');
|
|
exports.usePremiumTrialOffer = usePremiumTrialOffer;
|
|
function useGetTrialOffer(a0, a1) { // fn#55989, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7240:360, offset: 0x013ba8aa, size: 114 bytes, params: 3, frame: 17
|
|
const env0_0 = a1;
|
|
let value = UseTrialOfferModule;
|
|
value = value.useTrialOffer(a0);
|
|
const Object = global.Object;
|
|
const values = Object.values;
|
|
const TrialIdToProductOfferId = (ProductIdsAndroidModule).TrialIdToProductOfferId;
|
|
return Reflect.apply(values, Object, [TrialIdToProductOfferId[a0]]).every(function(a0) {
|
|
return require.has(a0);
|
|
}) ? value : null;
|
|
}
|
|
|
|
function usePremiumTrialOffer() { // fn#55991, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7240:617, offset: 0x013ba91c, size: 172 bytes, params: 1, frame: 20
|
|
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;
|
|
const value2 = useGetTrialOffer(PREMIUM_TIER_2_TRIAL_FOR_EVERYONE_TRIAL_ID, offerIds);
|
|
const value3 = useGetTrialOffer(PREMIUM_TIER_2_LIKELIHOOD_TRIAL_ID, offerIds);
|
|
const value4 = useGetTrialOffer(PREMIUM_TIER_2_REACTIVATION_TRIAL_ID, offerIds);
|
|
const value5 = useGetTrialOffer(PREMIUM_TIER_0_LIKELIHOOD_TRIAL_ID, offerIds);
|
|
items2 = [useGetTrialOffer(PREMIUM_TIER_2_REFERRAL_TRIAL_ID, offerIds), value2, value3, value4];
|
|
items2[4] = useGetTrialOffer(PREMIUM_TIER_2_HFU_TWO_WEEK_TRIAL_ID, offerIds);
|
|
items2[5] = value5;
|
|
return items2.find(function(a0) {
|
|
return a0 != null;
|
|
});
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun55988, 7062, [5140, 1880, 7063, 5143, 632,
|
|
2]) /* metro module 7062, dependencies: [5140, 1880, 7063, 5143, 632, 2] */;
|