decord/source/modules/quests/native/VideoQuestModal/VideoQuestModalReward.tsx

69 lines
2.8 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 14570
// Function ID: 14571
// Dependencies: [19, 21, 4668, 14546, 10723, 10986, 4738, 712, 14551, 4739, 1236, 2]
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 14570
import ThemesDefault from "Themes" /* 712 */;
import QUEST_PROGRESS_DIAMETER_BY_SIZEDefault from "QUEST_PROGRESS_DIAMETER_BY_SIZE" /* 14551 */;
import importAllResult from "noop" /* 19 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
let c3 = importAllResult;
({ jsx: c4, jsxs: c5 } = jsxProd);
let closure_6 = createCacheKey.createStyles({ questName: { textAlign: "center" } });
2026-08-24 06:08:38 +00:00
const memoResult = importAllResult.memo(function VideoQuestModalReward(style) {
const withQuestName = style.withQuestName;
2026-07-20 16:05:17 +00:00
let tmp = undefined === withQuestName;
if (!tmp) {
tmp = withQuestName;
}
2026-08-24 06:08:38 +00:00
const withRewardAvailableCopy = style.withRewardAvailableCopy;
2026-07-29 08:29:29 +00:00
let tmp9Result = undefined === withRewardAvailableCopy || withRewardAvailableCopy;
2026-08-24 06:08:38 +00:00
const size = style.size;
2026-07-20 16:05:17 +00:00
let str = "lg";
if (undefined !== size) {
str = size;
}
2026-08-24 06:08:38 +00:00
({ withRewardTileAnimation, onTextBlockLayout } = style);
let obj = quest(14546);
2026-07-23 10:11:24 +00:00
quest = obj.useVideoQuestModalContext().quest;
2026-08-24 06:08:38 +00:00
obj1 = quest(10723);
2026-07-20 16:05:17 +00:00
const items = [quest.id];
const questTaskDetails = obj1.useQuestTaskDetails(quest);
const callback = importAllResult.useCallback(() => {
2026-08-24 06:08:38 +00:00
let obj = quest(closure_1_2[5]);
2026-07-20 16:05:17 +00:00
obj = { questId: quest.id };
const result = obj.openRewardDetailsBottomSheet(obj);
}, items);
2026-08-24 06:08:38 +00:00
obj = { justify: "center", align: "center", spacing: ThemesDefault.space.PX_24, style: style.style, children: null };
2026-07-20 16:05:17 +00:00
obj = { hasConfetti: true, quest, size: str, progress: questTaskDetails.percentComplete, onPress: callback, withAnimation: withRewardTileAnimation };
2026-08-24 06:08:38 +00:00
const items1 = [callback(QUEST_PROGRESS_DIAMETER_BY_SIZEDefault, obj), ];
obj1 = { align: "center", spacing: ThemesDefault.space.PX_4, onLayout: onTextBlockLayout, children: null };
2026-07-20 16:05:17 +00:00
if (tmp) {
2026-07-29 08:29:29 +00:00
const obj2 = { variant: "heading-lg/semibold", color: "text-strong", style: null, children: null };
obj2[2] = tmp7.questName;
const intl = tmp3(1236).intl;
const obj3 = { questName: null };
obj3[0] = quest.config.messages.questName;
obj2[3] = intl.formatToPlainString(tmp3(1236).t.EAYZAr, obj3);
2026-08-24 06:08:38 +00:00
tmp = tmp9(tmp3(4739).Text, obj2);
2026-07-20 16:05:17 +00:00
}
const items2 = [tmp, ];
2026-07-29 08:29:29 +00:00
if (tmp9Result) {
const obj4 = { variant: "heading-sm/medium", color: "text-subtle", children: null };
const intl2 = tmp3(1236).intl;
obj4[2] = intl2.string(tmp3(1236).t["1Wvve2"]);
2026-08-24 06:08:38 +00:00
tmp9Result = tmp9(tmp3(4739).Text, obj4);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items2[1] = tmp9Result;
obj1[3] = items2;
2026-08-24 06:08:38 +00:00
items1[1] = closure_5(quest(4738).Stack, obj1);
2026-07-29 08:29:29 +00:00
obj[4] = items1;
2026-08-24 06:08:38 +00:00
return closure_5(quest(4738).Stack, obj);
2026-07-20 16:05:17 +00:00
});
2026-08-24 06:08:38 +00:00
let result = require("set").fileFinishedImporting("modules/quests/native/VideoQuestModal/VideoQuestModalReward.tsx");
2026-07-20 16:05:17 +00:00
export default memoResult;