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

97 lines
4.2 KiB
TypeScript
Raw Normal View History

2026-07-27 11:26:19 +00:00
// Module ID: 14112
// Function ID: 108523
2026-07-20 16:05:17 +00:00
// Name: VideoQuestModalHeader
2026-07-27 11:26:19 +00:00
// Dependencies: [31, 27, 5934, 33, 4131, 689, 14084, 10428, 5955, 3744, 10438, 4127, 1212, 14107, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-27 11:26:19 +00:00
// Module 14112 (VideoQuestModalHeader)
2026-07-23 10:11:24 +00:00
import "result";
import { View } from "get ActivityIndicator";
import { useVideoQuestUIStore } from "_toPropertyKey";
import jsxProd from "jsxProd";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
let closure_5;
let closure_6;
const require = arg1;
({ jsx: closure_5, jsxs: closure_6 } = jsxProd);
_createForOfIteratorHelperLoose = { videoContentHeaderWrapper: { flexDirection: "row", justifyContent: "space-between", alignItems: "flex-start" } };
_createForOfIteratorHelperLoose = { flexDirection: "column", flexShrink: 1, gap: require("_createForOfIteratorHelperLoose").space.PX_4 };
_createForOfIteratorHelperLoose.videoContentHeading = _createForOfIteratorHelperLoose;
_createForOfIteratorHelperLoose.subheader = { opacity: 0.6 };
let obj1 = { margin: -15, padding: 15, textShadowColor: require("_createForOfIteratorHelperLoose").colors.BLACK, textShadowOffset: { width: 0, height: 0 }, textShadowRadius: 15 };
_createForOfIteratorHelperLoose.textShadow = obj1;
_createForOfIteratorHelperLoose = _createForOfIteratorHelperLoose.createStyles(_createForOfIteratorHelperLoose);
let result = require("_toPropertyKey").fileFinishedImporting("modules/quests/native/VideoQuestModal/VideoQuestModalHeader.tsx");
2026-07-20 16:05:17 +00:00
export default function VideoQuestModalHeader(showCurrentVideoTime) {
let closeButtonIconColor;
let onClose;
let style;
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-07-23 10:11:24 +00:00
const tmp2 = _createForOfIteratorHelperLoose();
2026-07-27 11:26:19 +00:00
let obj = quest(14084);
2026-07-23 10:11:24 +00:00
quest = obj.useVideoQuestModalContext().quest;
2026-07-27 11:26:19 +00:00
let obj1 = quest(10428);
2026-07-20 16:05:17 +00:00
const questTaskDetails = obj1.useQuestTaskDetails(quest);
const tmp4 = useVideoQuestUIStore((arg0) => {
2026-07-23 10:11:24 +00:00
let tmp = arg0.videoProgress[quest.id];
2026-07-20 16:05:17 +00:00
if (null == tmp) {
const obj = { timestampSec: questTaskDetails.progressSeconds, duration: questTaskDetails.targetSeconds, maxTimestampSec: questTaskDetails.progressSeconds };
tmp = obj;
}
2026-07-23 10:11:24 +00:00
const result = quest(outer1_2[8]).parseMinutesAndSecondsFromSeconds(tmp.duration - tmp.timestampSec);
const obj2 = quest(outer1_2[8]);
return quest(outer1_2[8]).formatWatchTaskTime(result.minutes, result.seconds);
2026-07-25 08:10:48 +00:00
}, quest(3744).shallow);
2026-07-20 16:05:17 +00:00
const userStatus = quest.userStatus;
let completedAt;
if (null != userStatus) {
completedAt = userStatus.completedAt;
}
if (null == completedAt) {
2026-07-27 11:26:19 +00:00
let obj2 = quest(10438);
2026-07-20 16:05:17 +00:00
const videoQuestProgressRemainingAccessibilityLabel = obj2.getVideoQuestProgressRemainingAccessibilityLabel(questTaskDetails, tmp6);
}
obj = { style: items };
2026-07-23 10:11:24 +00:00
items = [tmp2.videoContentHeaderWrapper, style];
2026-07-20 16:05:17 +00:00
obj = { style: tmp2.videoContentHeading };
2026-07-23 10:11:24 +00:00
obj1 = { variant: "heading-md/semibold", color: "text-overlay-light" };
2026-07-20 16:05:17 +00:00
let textShadow2 = textShadow;
if (textShadow) {
textShadow2 = tmp2.textShadow;
}
obj1.style = textShadow2;
2026-07-23 10:11:24 +00:00
const intl = quest(1212).intl;
2026-07-20 16:05:17 +00:00
obj2 = { questName: quest.config.messages.questName };
2026-07-23 10:11:24 +00:00
obj1.children = intl.formatToPlainString(quest(1212).t.EQa7os, obj2);
2026-07-25 08:10:48 +00:00
const items1 = [callback(quest(4127).Text, obj1), ];
2026-07-23 10:11:24 +00:00
const obj3 = { variant: "heading-sm/semibold", color: "text-overlay-light", accessibilityLabel: videoQuestProgressRemainingAccessibilityLabel };
2026-07-20 16:05:17 +00:00
const items2 = [tmp2.subheader, ];
if (textShadow) {
textShadow = tmp2.textShadow;
}
items2[1] = textShadow;
obj3.style = items2;
let gamePublisher = tmp4;
if (null != completedAt) {
gamePublisher = tmp4;
if (!tmp) {
gamePublisher = quest.config.messages.gamePublisher;
}
}
obj3.children = gamePublisher;
2026-07-25 08:10:48 +00:00
items1[1] = callback(quest(4127).Text, obj3);
2026-07-20 16:05:17 +00:00
obj.children = items1;
2026-07-27 11:26:19 +00:00
const items3 = [closure_6(View, obj), callback(questTaskDetails(14107), { iconColor: closeButtonIconColor, onClose })];
2026-07-20 16:05:17 +00:00
obj.children = items3;
return closure_6(View, obj);
};