decord/source/modules/premium/native/gifting/PremiumGiftSuccess.tsx

94 lines
3.9 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 10006
// Function ID: 10007
2026-07-20 16:05:17 +00:00
// Name: PremiumGiftSuccess
2026-08-05 07:35:12 +00:00
// Dependencies: [19, 17, 7238, 1369, 21, 4255, 712, 1581, 9500, 38, 10007, 9931, 8062, 589, 1360, 1358, 10008, 10009, 10010, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-05 07:35:12 +00:00
// Module 10006 (PremiumGiftSuccess)
2026-07-29 08:29:29 +00:00
import set from "set";
import { View } from "PremiumGiftDMSuccessBody";
import createEmptyPromotionsByType from "createEmptyPromotionsByType";
2026-07-23 10:11:24 +00:00
import { ContentDismissActionType } from "ContentDismissActionType";
import jsxProd from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let c9;
let error;
let metroImportAll;
2026-07-23 10:11:24 +00:00
let require = arg1;
2026-07-29 08:29:29 +00:00
({ jsx: error, Fragment: metroImportAll, jsxs: c9 } = jsxProd);
let closure_10 = createCacheKey.createStyles((arg0) => {
let obj = { bodyContainer: null, actionContainer: null };
obj = { backgroundColor: importDefault(712).colors.BACKGROUND_BASE_LOW, paddingHorizontal: importDefault(712).space.PX_16, flex: 1, alignContent: "center", justifyContent: "center", flexGrow: 1 };
obj[0] = obj;
obj = { backgroundColor: importDefault(712).colors.BACKGROUND_BASE_LOW, paddingTop: importDefault(712).space.PX_16, paddingBottom: arg0 + importDefault(712).space.PX_16, paddingHorizontal: importDefault(712).space.PX_16, gap: importDefault(712).space.PX_8 };
const merged = Object.assign(importDefault(712).shadows.SHADOW_TOP_LOW);
obj[1] = obj;
2026-07-20 16:05:17 +00:00
return obj;
});
2026-07-29 08:29:29 +00:00
let result = require("createEmptyPromotionsByType").fileFinishedImporting("modules/premium/native/gifting/PremiumGiftSuccess.tsx");
2026-07-20 16:05:17 +00:00
export default function PremiumGiftSuccess() {
let giftCodeRecord;
let recipientUser;
2026-07-29 08:29:29 +00:00
let selectedGiftingPromotionReward;
const tmp3 = callback3(importDefault(stateFromStores[7])().bottom);
2026-07-23 10:11:24 +00:00
let obj = require(stateFromStores[8]);
2026-07-20 16:05:17 +00:00
const nativeGiftContext = obj.useNativeGiftContext();
2026-07-29 08:29:29 +00:00
({ recipientUser, giftCodeRecord, selectedGiftingPromotionReward } = nativeGiftContext);
2026-07-23 10:11:24 +00:00
importDefault(stateFromStores[9])(null != giftCodeRecord, "Gift code record cannot be null on success screen");
2026-07-29 08:29:29 +00:00
const tmp7 = importDefault(stateFromStores[10])();
require = tmp7;
const tmp8 = importDefault(stateFromStores[11])();
importDefault = tmp8;
2026-07-23 10:11:24 +00:00
let obj1 = require(stateFromStores[12]);
2026-07-29 08:29:29 +00:00
const getOrFetchPurchase = obj1.useGetOrFetchPurchase(selectedGiftingPromotionReward, false);
2026-07-23 10:11:24 +00:00
let obj2 = require(stateFromStores[13]);
2026-07-29 08:29:29 +00:00
const items = [createEmptyPromotionsByType];
2026-07-23 10:11:24 +00:00
stateFromStores = obj2.useStateFromStores(items, () => {
2026-07-29 08:29:29 +00:00
giftPromotion = giftPromotion.getGiftPromotion();
2026-07-20 16:05:17 +00:00
let id;
2026-07-29 08:29:29 +00:00
if (giftPromotion != null) {
2026-07-20 16:05:17 +00:00
id = giftPromotion.id;
}
return id;
});
2026-07-29 08:29:29 +00:00
const items1 = [tmp8, tmp7, stateFromStores];
2026-07-20 16:05:17 +00:00
const effect = React.useEffect(() => {
2026-07-29 08:29:29 +00:00
let tmp = null != tmp7 && null != tmp7.reminderNotice && closure_1;
2026-07-20 16:05:17 +00:00
if (tmp) {
tmp = null != stateFromStores;
}
if (tmp) {
2026-07-29 08:29:29 +00:00
let obj = tmp7(stateFromStores[14]);
obj = { dismissAction: null };
obj[0] = outer1_6.INDIRECT_ACTION;
const result = obj.markSnowflakeBoundDismissibleContentAsDismissed(tmp7(stateFromStores[15]).DismissibleContent.GIFTING_PROMOTION_REMINDER, stateFromStores, obj);
2026-07-20 16:05:17 +00:00
}
}, items1);
if (null == recipientUser) {
2026-07-29 08:29:29 +00:00
obj = { giftCodeRecord: null };
obj[0] = giftCodeRecord;
let tmp13 = callback(tmp(tmp2[16]), obj);
let tmp12 = callback;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp12 = callback;
tmp13 = callback(tmp(tmp2[17]), {});
2026-07-20 16:05:17 +00:00
}
if (null != getOrFetchPurchase) {
2026-07-29 08:29:29 +00:00
obj = { purchase: null };
obj[0] = getOrFetchPurchase;
let tmp12Result = tmp12(tmp(tmp2[18]), obj);
2026-07-20 16:05:17 +00:00
} else if (null == recipientUser) {
2026-07-29 08:29:29 +00:00
obj1 = { giftCodeRecord: null };
obj1[0] = giftCodeRecord;
tmp12Result = tmp12(tmp4(tmp2[16]).PremiumGiftSuccessActions, obj1);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp12Result = tmp12(tmp4(tmp2[17]).PremiumGiftDMSuccessActions, {});
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj2 = { children: null };
const items2 = [tmp12(View, { style: tmp3.bodyContainer, children: tmp13 }), tmp12(View, { style: tmp3.actionContainer, children: tmp12Result })];
obj2[0] = items2;
2026-07-20 16:05:17 +00:00
return callback2(closure_8, obj2);
};