92 lines
4.2 KiB
TypeScript
92 lines
4.2 KiB
TypeScript
// Module ID: 14754
|
|
// Function ID: 14755
|
|
// Name: VideoQuestModalHeader
|
|
// Dependencies: [19, 17, 7450, 21, 4478, 712, 14727, 11083, 7469, 4106, 11111, 4474, 1236, 14749, 2]
|
|
// Exports: default
|
|
|
|
// Module 14754 (VideoQuestModalHeader)
|
|
import noopAll from "noop" /* 19 */;
|
|
import ThemesDefault from "Themes" /* 712 */;
|
|
import { View } from "get ActivityIndicator" /* 17 */;
|
|
import { useVideoQuestUIStore } from "_toPropertyKey" /* 7450 */;
|
|
import jsxProd from "jsxProd" /* 21 */;
|
|
import createCacheKey from "createCacheKey" /* 4478 */;
|
|
|
|
const require = arg1;
|
|
noopAll;
|
|
({ 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: ThemesDefault.space.PX_4 };
|
|
createCacheKey[1] = createCacheKey;
|
|
createCacheKey[2] = { opacity: 0.6 };
|
|
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");
|
|
|
|
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 = callback();
|
|
let obj = quest(14727);
|
|
quest = obj.useVideoQuestModalContext().quest;
|
|
obj1 = quest(11083);
|
|
const questTaskDetails = obj1.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[0], targetSeconds: obj[1], progressSeconds: obj[2] } = questTaskDetails);
|
|
tmp = obj;
|
|
}
|
|
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(4106).shallow);
|
|
const userStatus = quest.userStatus;
|
|
let completedAt;
|
|
if (userStatus != null) {
|
|
completedAt = userStatus.completedAt;
|
|
}
|
|
if (null == completedAt) {
|
|
const videoQuestProgressRemainingAccessibilityLabel = tmp3(11111).getVideoQuestProgressRemainingAccessibilityLabel(questTaskDetails, tmp8);
|
|
const tmp3Result = tmp3(11111);
|
|
}
|
|
obj = { style: items, children: null };
|
|
items = [tmp2.videoContentHeaderWrapper, style];
|
|
obj = { style: tmp2.videoContentHeading, children: null };
|
|
let textShadow2 = textShadow;
|
|
if (textShadow) {
|
|
textShadow2 = tmp2.textShadow;
|
|
}
|
|
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 });
|
|
const items1 = [closure_5(quest(4474).Text, obj1), ];
|
|
const obj3 = { variant: "heading-sm/semibold", color: "text-overlay-light", accessibilityLabel: videoQuestProgressRemainingAccessibilityLabel, style: null, children: null };
|
|
const items2 = [tmp2.subheader, ];
|
|
if (textShadow) {
|
|
textShadow = tmp2.textShadow;
|
|
}
|
|
items2[1] = textShadow;
|
|
obj3[3] = items2;
|
|
let gamePublisher = tmp6;
|
|
if (null != completedAt) {
|
|
gamePublisher = tmp6;
|
|
if (!tmp) {
|
|
gamePublisher = quest.config.messages.gamePublisher;
|
|
}
|
|
}
|
|
obj3[4] = gamePublisher;
|
|
items1[1] = closure_5(quest(4474).Text, obj3);
|
|
obj[1] = items1;
|
|
const items3 = [closure_6(View, obj), closure_5(questTaskDetails(14749), { iconColor: closeButtonIconColor, onClose })];
|
|
obj[1] = items3;
|
|
return closure_6(View, obj);
|
|
};
|