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

96 lines
4.2 KiB
TypeScript
Raw Normal View History

2026-08-15 05:55:55 +00:00
// Module ID: 14506
// Function ID: 14507
2026-07-20 16:05:17 +00:00
// Name: VideoQuestModalHeader
2026-08-15 05:55:55 +00:00
// Dependencies: [19, 17, 7455, 21, 4661, 712, 14478, 10684, 7476, 4006, 10704, 4734, 1236, 14501, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-15 05:55:55 +00:00
// Module 14506 (VideoQuestModalHeader)
2026-07-29 08:29:29 +00:00
import "noop";
2026-07-23 10:11:24 +00:00
import { View } from "get ActivityIndicator";
import { useVideoQuestUIStore } from "_toPropertyKey";
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 c5;
2026-07-23 10:11:24 +00:00
let closure_6;
const require = arg1;
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 };
createCacheKey = { flexDirection: "column", flexShrink: 1, gap: require("Themes").space.PX_4 };
createCacheKey[1] = createCacheKey;
createCacheKey[2] = { opacity: 0.6 };
createCacheKey[3] = { margin: -15, padding: 15, textShadowColor: require("Themes").colors.BLACK, textShadowOffset: { width: 0, height: 0 }, textShadowRadius: 15 };
createCacheKey = createCacheKey.createStyles(createCacheKey);
let obj1 = { margin: -15, padding: 15, textShadowColor: require("Themes").colors.BLACK, textShadowOffset: { width: 0, height: 0 }, textShadowRadius: 15 };
2026-07-23 10:11:24 +00:00
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-29 08:29:29 +00:00
const tmp2 = createCacheKey();
2026-08-15 05:55:55 +00:00
let obj = quest(14478);
2026-07-23 10:11:24 +00:00
quest = obj.useVideoQuestModalContext().quest;
2026-08-15 05:55:55 +00:00
let obj1 = quest(10684);
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-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-08-15 05:55:55 +00:00
}, quest(4006).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) {
2026-08-15 05:55:55 +00:00
const videoQuestProgressRemainingAccessibilityLabel = tmp3(10704).getVideoQuestProgressRemainingAccessibilityLabel(questTaskDetails, tmp8);
const tmp3Result = tmp3(10704);
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(1236).intl;
obj1[3] = intl.formatToPlainString(quest(1236).t.EQa7os, { questName: quest.config.messages.questName });
2026-08-15 05:55:55 +00:00
const items1 = [closure_5(quest(4734).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;
2026-08-15 05:55:55 +00:00
items1[1] = closure_5(quest(4734).Text, obj3);
2026-07-29 08:29:29 +00:00
obj[1] = items1;
2026-08-15 05:55:55 +00:00
const items3 = [closure_6(View, obj), closure_5(questTaskDetails(14501), { 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);
};