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

93 lines
4.2 KiB
TypeScript
Raw Normal View History

// Module ID: 15156
// Function ID: 15157
2026-07-20 16:05:17 +00:00
// Name: VideoQuestModalHeader
// Dependencies: [19, 17, 7705, 21, 4560, 576, 15129, 11488, 7724, 4184, 11517, 4556, 1114, 15151, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 15156 (VideoQuestModalHeader)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
import ThemesDefault from "Themes" /* 576 */;
2026-08-24 06:08:38 +00:00
import { View } from "get ActivityIndicator" /* 17 */;
import { useVideoQuestUIStore } from "_toPropertyKey" /* 7705 */;
2026-08-24 06:08:38 +00:00
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4560 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
noopAll;
2026-07-29 08:29:29 +00:00
({ jsx: c5, jsxs: closure_6 } = jsxProd);
createCacheKey = { videoContentHeaderWrapper: { flexDirection: "row", justifyContent: "space-between", alignItems: "flex-start" }, videoContentHeading: null, subheader: null, textShadow: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { flexDirection: "column", flexShrink: 1, gap: ThemesDefault.space.PX_4 };
2026-07-29 08:29:29 +00:00
createCacheKey[1] = createCacheKey;
createCacheKey[2] = { opacity: 0.6 };
2026-08-24 06:08:38 +00:00
createCacheKey[3] = { margin: -15, padding: 15, textShadowColor: ThemesDefault.colors.BLACK, textShadowOffset: { width: 0, height: 0 }, textShadowRadius: 15 };
let closure_7 = createCacheKey.createStyles(createCacheKey);
let obj1 = { margin: -15, padding: 15, textShadowColor: ThemesDefault.colors.BLACK, textShadowOffset: { width: 0, height: 0 }, textShadowRadius: 15 };
let result = require("set").fileFinishedImporting("modules/quests/native/VideoQuestModal/VideoQuestModalHeader.tsx");
2026-07-20 16:05:17 +00:00
export default function VideoQuestModalHeader(showCurrentVideoTime) {
showCurrentVideoTime = showCurrentVideoTime.showCurrentVideoTime;
let tmp = undefined !== showCurrentVideoTime;
({ closeButtonIconColor, onClose, style } = showCurrentVideoTime);
if (tmp) {
tmp = showCurrentVideoTime;
}
const withTextShadow = showCurrentVideoTime.withTextShadow;
let textShadow = undefined !== withTextShadow && withTextShadow;
2026-08-24 06:08:38 +00:00
const tmp2 = callback();
let obj = quest(15129);
2026-07-23 10:11:24 +00:00
quest = obj.useVideoQuestModalContext().quest;
obj1 = quest(11488);
2026-07-20 16:05:17 +00:00
const questTaskDetails = obj1.useQuestTaskDetails(quest);
2026-07-29 08:29:29 +00:00
const tmp6 = useVideoQuestUIStore((arg0) => {
2026-07-23 10:11:24 +00:00
let tmp = arg0.videoProgress[quest.id];
2026-07-29 08:29:29 +00:00
if (tmp == null) {
const obj = { timestampSec: null, duration: null, maxTimestampSec: null };
({ progressSeconds: obj[0], targetSeconds: obj[1], progressSeconds: obj[2] } = questTaskDetails);
2026-07-20 16:05:17 +00:00
tmp = obj;
}
2026-08-24 06:08:38 +00:00
const result = quest(closure_1_2[8]).parseMinutesAndSecondsFromSeconds(tmp.duration - tmp.timestampSec);
const obj2 = quest(closure_1_2[8]);
return quest(closure_1_2[8]).formatWatchTaskTime(result.minutes, result.seconds);
}, quest(4184).shallow);
2026-07-20 16:05:17 +00:00
const userStatus = quest.userStatus;
let completedAt;
2026-07-29 08:29:29 +00:00
if (userStatus != null) {
2026-07-20 16:05:17 +00:00
completedAt = userStatus.completedAt;
}
if (null == completedAt) {
const videoQuestProgressRemainingAccessibilityLabel = tmp3(11517).getVideoQuestProgressRemainingAccessibilityLabel(questTaskDetails, tmp8);
const tmp3Result = tmp3(11517);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj = { style: items, children: null };
2026-07-23 10:11:24 +00:00
items = [tmp2.videoContentHeaderWrapper, style];
2026-07-29 08:29:29 +00:00
obj = { style: tmp2.videoContentHeading, children: null };
2026-07-20 16:05:17 +00:00
let textShadow2 = textShadow;
if (textShadow) {
textShadow2 = tmp2.textShadow;
}
2026-07-29 08:29:29 +00:00
obj1 = { variant: "heading-md/semibold", color: "text-overlay-light", style: textShadow2, children: null };
const intl = tmp3(1114).intl;
obj1[3] = intl.formatToPlainString(quest(1114).t.EQa7os, { questName: quest.config.messages.questName });
const items1 = [closure_5(quest(4556).Text, obj1), ];
2026-07-29 08:29:29 +00:00
const obj3 = { variant: "heading-sm/semibold", color: "text-overlay-light", accessibilityLabel: videoQuestProgressRemainingAccessibilityLabel, style: null, children: null };
2026-07-20 16:05:17 +00:00
const items2 = [tmp2.subheader, ];
if (textShadow) {
textShadow = tmp2.textShadow;
}
items2[1] = textShadow;
2026-07-29 08:29:29 +00:00
obj3[3] = items2;
let gamePublisher = tmp6;
2026-07-20 16:05:17 +00:00
if (null != completedAt) {
2026-07-29 08:29:29 +00:00
gamePublisher = tmp6;
2026-07-20 16:05:17 +00:00
if (!tmp) {
gamePublisher = quest.config.messages.gamePublisher;
}
}
2026-07-29 08:29:29 +00:00
obj3[4] = gamePublisher;
items1[1] = closure_5(quest(4556).Text, obj3);
2026-07-29 08:29:29 +00:00
obj[1] = items1;
const items3 = [closure_6(View, obj), closure_5(questTaskDetails(15151), { iconColor: closeButtonIconColor, onClose })];
2026-07-29 08:29:29 +00:00
obj[1] = items3;
2026-07-20 16:05:17 +00:00
return closure_6(View, obj);
};