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

65 lines
2.8 KiB
TypeScript
Raw Normal View History

// Module ID: 15256
// Function ID: 15257
// Name: VideoQuestModalReward
// Dependencies: [19, 21, 4638, 15233, 11629, 11909, 5058, 576, 15238, 4634, 1115, 2]
2026-07-20 16:05:17 +00:00
// Module 15256 (VideoQuestModalReward)
import nativeDefault from "native" /* 576 */;
import QuestUtils from "QuestUtils" /* 11909 */;
import QuestProgressIndicatorDefault from "QuestProgressIndicator" /* 15238 */;
import noop from "module_19" /* 19 */;
2026-07-23 10:11:24 +00:00
require = fn;
const jsxProd = fn(21);
({ jsx: closure_4, jsxs: hasOwnProperty } = jsxProd);
const createStyles = fn(4638);
let closure_6 = createStyles.createStyles({ questName: { textAlign: "center" } });
let size = fn(2);
let result = size.fileFinishedImporting("modules/quests/native/VideoQuestModal/VideoQuestModalReward.tsx");
export default noop.memo(function VideoQuestModalReward(style) {
2026-08-24 06:08:38 +00:00
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);
quest = quest(15233).useVideoQuestModalContext().quest;
const obj = quest(15233);
2026-07-20 16:05:17 +00:00
const items = [quest.id];
const questTaskDetails = quest(11629).useQuestTaskDetails(quest);
const callback = noop.useCallback(() => {
const result = QuestUtils.openRewardDetailsBottomSheet({ questId: quest.id });
2026-07-20 16:05:17 +00:00
}, items);
const obj2 = quest(11629);
const obj3 = { justify: "center", align: "center", spacing: nativeDefault.space.PX_24, style: style.style, children: null };
const items1 = [closure_4(QuestProgressIndicatorDefault, { hasConfetti: true, quest, size: str, progress: questTaskDetails.percentComplete, onPress: callback, withAnimation: withRewardTileAnimation }), ];
const obj5 = { align: "center", spacing: nativeDefault.space.PX_4, onLayout: onTextBlockLayout, children: null };
2026-07-20 16:05:17 +00:00
if (tmp) {
const obj6 = { variant: "heading-lg/semibold", color: "text-strong", style: tmp7.questName, children: null };
const intl = tmp3(1115).intl;
const obj7 = { questName: quest.config.messages.questName };
obj6.children = intl.formatToPlainString(tmp3(1115).t.EAYZAr, obj7);
tmp = tmp9(tmp3(4634).Text, obj6);
2026-07-20 16:05:17 +00:00
}
const items2 = [tmp, ];
2026-07-29 08:29:29 +00:00
if (tmp9Result) {
const obj8 = { variant: "heading-sm/medium", color: "text-subtle", children: null };
const intl2 = tmp3(1115).intl;
obj8.children = intl2.string(tmp3(1115).t["1Wvve2"]);
tmp9Result = tmp9(tmp3(4634).Text, obj8);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items2[1] = tmp9Result;
obj5.children = items2;
items1[1] = closure_5(quest(5058).Stack, obj5);
obj3.children = items1;
return closure_5(quest(5058).Stack, obj3);
2026-07-20 16:05:17 +00:00
});