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

100 lines
3.5 KiB
TypeScript
Raw Normal View History

2026-08-13 07:00:46 +00:00
// Module ID: 14471
// Function ID: 14472
2026-07-20 16:05:17 +00:00
// Name: VideoQuestTranscriptActionSheet
2026-08-13 07:00:46 +00:00
// Dependencies: [19, 17, 7208, 21, 4342, 712, 1628, 10432, 10422, 5804, 5436, 1236, 5439, 4753, 4338, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-13 07:00:46 +00:00
// Module 14471 (VideoQuestTranscriptActionSheet)
2026-07-29 08:29:29 +00:00
import noop from "noop";
2026-07-23 10:11:24 +00:00
import { ActivityIndicator } from "get ActivityIndicator";
import _toPropertyKey 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;
2026-07-29 08:29:29 +00:00
let error;
let metroImportAll;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
({ FetchStatus: c5, useVideoQuestUIStore: closure_6 } = _toPropertyKey);
({ jsx: error, jsxs: metroImportAll } = jsxProd);
createCacheKey = { content: null, loadingSpinner: null };
createCacheKey = { paddingBottom: require("Themes").space.PX_8 };
createCacheKey[0] = createCacheKey;
createCacheKey[1] = { height: 100 };
createCacheKey = createCacheKey.createStyles(createCacheKey);
2026-07-23 10:11:24 +00:00
const result = require("_toPropertyKey").fileFinishedImporting("modules/quests/native/VideoQuestModal/VideoQuestTranscriptActionSheet.tsx");
2026-07-20 16:05:17 +00:00
export default function VideoQuestTranscriptActionSheet(quest) {
quest = quest.quest;
2026-07-29 08:29:29 +00:00
let importDefault;
const tmp = createCacheKey();
const tmp2 = callback((transcript) => transcript.transcript);
importDefault = tmp2;
2026-07-23 10:11:24 +00:00
let items = [quest, tmp2];
2026-07-20 16:05:17 +00:00
const effect = React.useEffect(() => {
2026-07-23 10:11:24 +00:00
const questAsset = quest(outer1_2[7]).getQuestAsset(quest, quest(outer1_2[7]).QuestAssetType.VIDEO_PLAYER_TRANSCRIPT, undefined, true);
2026-07-29 08:29:29 +00:00
let tmp6 = null == c1 || tmp5.questId !== tmp3.id;
if (!tmp6) {
tmp6 = tmp5.fetchStatus === outer1_5.NONE;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp6) {
let tmp9 = tmp5.fetchStatus === outer1_5.SUCCESS;
2026-07-20 16:05:17 +00:00
if (tmp9) {
let url;
2026-07-29 08:29:29 +00:00
if (questAsset != null) {
2026-07-20 16:05:17 +00:00
url = questAsset.url;
}
2026-07-29 08:29:29 +00:00
tmp9 = url !== tmp5.url;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp6 = tmp9;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp6) {
const videoTranscript = quest(outer1_2[8]).fetchVideoTranscript(tmp3, true);
const tmpResult = quest(outer1_2[8]);
2026-07-20 16:05:17 +00:00
}
}, items);
let text;
2026-07-29 08:29:29 +00:00
if (tmp2 != null) {
2026-07-20 16:05:17 +00:00
text = tmp2.text;
}
const items1 = [text];
const memo = React.useMemo(() => {
let text;
2026-07-29 08:29:29 +00:00
if (c1 != null) {
text = tmp.text;
2026-07-20 16:05:17 +00:00
}
if (null == text) {
let items = [];
} else {
2026-07-29 08:29:29 +00:00
const parts = tmp.text.split("\n");
2026-07-20 16:05:17 +00:00
const mapped = parts.map((str) => str.trim());
items = mapped.filter((arg0) => arg0.length > 0);
2026-07-29 08:29:29 +00:00
const str = tmp.text;
2026-07-20 16:05:17 +00:00
}
return items;
}, items1);
2026-07-29 08:29:29 +00:00
let obj = { scrollable: true, header: null, children: null };
obj = { title: null };
const intl = quest(1236).intl;
obj[0] = intl.string(quest(1236).t["1YS80z"]);
2026-08-13 07:00:46 +00:00
obj[1] = callback2(quest(5436).BottomSheetTitleHeader, obj);
2026-08-11 06:20:06 +00:00
obj = { contentContainerStyle: { paddingBottom: importDefault(1628)().bottom }, children: null };
2026-07-29 08:29:29 +00:00
const obj1 = { spacing: 16, style: tmp.content, children: null };
2026-07-20 16:05:17 +00:00
let fetchStatus;
2026-07-29 08:29:29 +00:00
if (tmp2 != null) {
2026-07-20 16:05:17 +00:00
fetchStatus = tmp2.fetchStatus;
}
2026-07-29 08:29:29 +00:00
let tmp7Result = fetchStatus === constants.FETCHING;
if (tmp7Result) {
const obj2 = { style: null, size: "large" };
obj2[0] = tmp.loadingSpinner;
tmp7Result = tmp7(ActivityIndicator, obj2);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const items2 = [tmp7Result, memo.length > 0 && memo.map((children) => callback(quest(table[14]).Text, { variant: "heading-md/normal", color: "text-muted", children }, arg1))];
obj1[2] = items2;
2026-08-13 07:00:46 +00:00
obj[1] = closure_8(quest(4753).Stack, obj1);
obj[2] = callback2(quest(5439).BottomSheetScrollView, obj);
return callback2(quest(5804).ActionSheet, obj);
2026-07-20 16:05:17 +00:00
};