48 lines
1.7 KiB
TypeScript
48 lines
1.7 KiB
TypeScript
// Module ID: 7978
|
|
// Function ID: 7979
|
|
// Name: usePremiumDiscountOffer
|
|
// Dependencies: [6092, 1923, 7979, 6095, 644, 2]
|
|
// Exports: usePremiumDiscountOffer, usePremiumGroupDiscountOffer
|
|
|
|
// Module 7978 (usePremiumDiscountOffer)
|
|
import useDiscountOfferDefault from "useDiscountOffer" /* 7979 */;
|
|
import closure_3 from "updateProduct" /* 6092 */;
|
|
import GuildFeatures from "GuildFeatures" /* 1923 */;
|
|
|
|
const require = arg1;
|
|
({ PREMIUM_TIER_2_LIKELIHOOD_1_MONTH_40_PERCENT_DISCOUNT_ID: c4, PREMIUM_TIER_2_REENGAGEMENT_1_MONTH_40_PERCENT_DISCOUNT_ID: c5 } = GuildFeatures);
|
|
const result = require("set").fileFinishedImporting("modules/premium/hooks/usePremiumDiscountOffer.android.tsx");
|
|
|
|
export const usePremiumDiscountOffer = function usePremiumDiscountOffer() {
|
|
const items = [closure_3];
|
|
offerIds = offerIds(644).useStateFromStoresObject(items, () => ({ isFetchingProducts: closure_3.isFetchingProducts(), offerIds: closure_3.getOfferIds() })).offerIds;
|
|
const obj = offerIds(644);
|
|
const tmp = offerIds;
|
|
const tmp3 = importDefault;
|
|
let values = Object.values(offerIds(6095).DiscountIdToProductOfferId[closure_4]);
|
|
let tmp5 = null;
|
|
if (0 !== values.length) {
|
|
let tmp6 = null;
|
|
if (values.every((arg0) => offerIds.has(arg0))) {
|
|
tmp6 = tmp4;
|
|
}
|
|
tmp5 = tmp6;
|
|
}
|
|
tmp4 = useDiscountOfferDefault(closure_4);
|
|
values = Object.values(tmp(6095).DiscountIdToProductOfferId[closure_5]);
|
|
let tmp8 = null;
|
|
if (0 !== values.length) {
|
|
let tmp9 = null;
|
|
if (values.every((arg0) => offerIds.has(arg0))) {
|
|
tmp9 = tmp7;
|
|
}
|
|
tmp8 = tmp9;
|
|
}
|
|
if (tmp5 == null) {
|
|
tmp5 = tmp8;
|
|
}
|
|
return tmp5;
|
|
};
|
|
export function usePremiumGroupDiscountOffer() {
|
|
return null;
|
|
}
|