decord/source/modules/quests/native/VideoQuestModal/VideoQuestModalHeader.tsx
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

87 lines
4 KiB
TypeScript

// Module ID: 15183
// Function ID: 15184
// Name: VideoQuestModalHeader
// Dependencies: [19, 17, 7719, 21, 4574, 576, 15156, 11515, 7738, 4197, 11544, 4570, 1114, 15178, 2]
// Exports: default
// Module 15183 (VideoQuestModalHeader)
import nativeDefault from "native" /* 576 */;
import QuestTaskUtils from "QuestTaskUtils" /* 7738 */;
import noop from "module_19" /* 19 */;
require = fn;
const View = fn(17).View;
const useVideoQuestUIStore = fn(7719).useVideoQuestUIStore;
const jsxProd = fn(21);
({ jsx: hasOwnProperty, jsxs: metroRequire } = jsxProd);
const createStyles = fn(4574);
let obj2 = { videoContentHeaderWrapper: { flexDirection: "row", justifyContent: "space-between", alignItems: "flex-start" }, videoContentHeading: { flexDirection: "column", flexShrink: 1, gap: nativeDefault.space.PX_4 }, textShadow: null };
let obj3 = { flexDirection: "column", flexShrink: 1, gap: nativeDefault.space.PX_4 };
obj2.textShadow = { margin: -15, padding: 15, textShadowColor: nativeDefault.colors.BLACK, textShadowOffset: { width: 0, height: 0 }, textShadowRadius: 15 };
let closure_7 = createStyles.createStyles(obj2);
const size = fn(2);
const result = size.fileFinishedImporting("modules/quests/native/VideoQuestModal/VideoQuestModalHeader.tsx");
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;
const tmp2 = closure_7();
quest = quest(15156).useVideoQuestModalContext().quest;
let obj = quest(15156);
const questTaskDetails = quest(11515).useQuestTaskDetails(quest);
const tmp6 = useVideoQuestUIStore((arg0) => {
let tmp = arg0.videoProgress[quest.id];
if (tmp == null) {
const obj = { timestampSec: null, duration: null, maxTimestampSec: null };
({ progressSeconds: obj.timestampSec, targetSeconds: obj.duration, progressSeconds: obj.maxTimestampSec } = questTaskDetails);
tmp = obj;
}
const time = QuestTaskUtils.parseMinutesAndSecondsFromSeconds(tmp.duration - tmp.timestampSec);
return QuestTaskUtils.formatWatchTaskTime(time.minutes, time.seconds);
}, quest(4197).shallow);
const userStatus = quest.userStatus;
let completedAt;
if (userStatus != null) {
completedAt = userStatus.completedAt;
}
if (null == completedAt) {
const videoQuestProgressRemainingAccessibilityLabel = tmp3(11544).getVideoQuestProgressRemainingAccessibilityLabel(questTaskDetails, tmp8);
const tmp3Result = tmp3(11544);
}
const obj3 = { style: null, children: null };
const items = [tmp2.videoContentHeaderWrapper, style];
obj3.style = items;
const obj4 = { style: tmp2.videoContentHeading, children: null };
let textShadow2 = textShadow;
if (textShadow) {
textShadow2 = tmp2.textShadow;
}
const obj5 = { variant: "heading-md/semibold", color: "text-overlay-light", style: textShadow2, children: null };
const intl = tmp3(1114).intl;
obj5.children = intl.formatToPlainString(quest(1114).t.EQa7os, { questName: quest.config.messages.questName });
const items1 = [closure_5(quest(4570).Text, obj5), ];
const obj7 = { variant: "heading-sm/semibold", color: "text-overlay-light", accessibilityLabel: videoQuestProgressRemainingAccessibilityLabel, style: null, children: null };
if (textShadow) {
textShadow = tmp2.textShadow;
}
obj7.style = textShadow;
let gamePublisher = tmp6;
if (null != completedAt) {
gamePublisher = tmp6;
if (!tmp) {
gamePublisher = quest.config.messages.gamePublisher;
}
}
obj7.children = gamePublisher;
items1[1] = closure_5(quest(4570).Text, obj7);
obj4.children = items1;
const items2 = [closure_6(View, obj4), closure_5(questTaskDetails(15178), { iconColor: closeButtonIconColor, onClose })];
obj3.children = items2;
return closure_6(View, obj3);
};