109 lines
6.8 KiB
TypeScript
109 lines
6.8 KiB
TypeScript
/* Metro module 13625; source: modules/quests/native/VideoQuestModal/VideoQuestModalHeader.tsx; dependencies: [31, 27, 7095, 33, 4501, 697, 13597, 9483, 7116, 3769, 9522, 4573, 1244, 13618, 2] */
|
|
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as IndexNativeModule from '../../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as Module03769Module from '../../../../by-id/module-03769.js'; /* Metro dependency 3769 */
|
|
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as VideoQuestUIStoreModule from '../../VideoQuestUIStore.tsx'; /* Metro dependency 7095 */
|
|
import * as QuestHooksModule from '../../hooks/QuestHooks.tsx'; /* Metro dependency 9483 */
|
|
import * as VideoQuestModalContextModule from './VideoQuestModalContext.tsx'; /* Metro dependency 13597 */
|
|
|
|
function _fun104063(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#104063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13822:6, offset: 0x02282e41, size: 365 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
let value = JsxRuntimeModule;
|
|
const env0_5 = value.jsx;
|
|
const env0_6 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {videoContentHeaderWrapper: {'flexDirection': 'row', 'justifyContent': 'space-between',
|
|
'alignItems': 'flex-start'}};
|
|
const PX_4 = (Native).space.PX_4;
|
|
object.videoContentHeading = {'flexDirection': 'column', 'flexShrink': 1, gap: PX_4};
|
|
object.subheader = {opacity: 0.6};
|
|
const BLACK = (Native).colors.BLACK;
|
|
object.textShadow = {'margin': -15, 'padding': 15, 'textShadowColor': null, 'textShadowOffset': null,
|
|
'textShadowRadius': 15, textShadowColor: BLACK, textShadowOffset: {'width': 0, 'height': 0}};
|
|
const env0_7 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/quests/native/VideoQuestModal/VideoQuestModalHeader.tsx');
|
|
exports.default = VideoQuestModalHeader;
|
|
function VideoQuestModalHeader({closeButtonIconColor, onClose, style, showCurrentVideoTime, withTextShadow}) { // fn#104064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13822:544, offset: 0x02282fae, size: 625 bytes, params: 2, frame: 35
|
|
const r14 = showCurrentVideoTime !== undefined && showCurrentVideoTime;
|
|
let r17 = withTextShadow !== undefined && withTextShadow;
|
|
const styles = useStyles();
|
|
const useVideoQuestModalContext = VideoQuestModalContextModule.useVideoQuestModalContext;
|
|
const quest = Reflect.apply(useVideoQuestModalContext, VideoQuestModalContextModule, []).quest;
|
|
const value5 = (QuestHooksModule).useQuestTaskDetails(quest);
|
|
const value6 = useVideoQuestUIStore(_fun104065, (Module03769Module).shallow);
|
|
const userStatus = quest.userStatus;
|
|
const value7 = userStatus?.completedAt != null;
|
|
const r12 = value7 ? r14 ? (require(9522) /* metro dependency 9522: VideoQuestUtils */).getVideoQuestProgressRemainingAccessibilityLabel(value5,
|
|
value7) : undefined : (require(9522) /* metro dependency 9522: VideoQuestUtils */).getVideoQuestProgressRemainingAccessibilityLabel(value5,
|
|
value7);
|
|
const items2 = [styles.videoContentHeaderWrapper, style];
|
|
const Text = (TextModule).Text;
|
|
const r7 = r17 && styles.textShadow;
|
|
const intl = (IndexNativeModule).intl;
|
|
const formatToPlainString = intl.formatToPlainString;
|
|
const EQa7os = (IndexNativeModule).t.EQa7os;
|
|
const text = (
|
|
<Text
|
|
variant="heading-md/semibold"
|
|
color="white"
|
|
style={r7}
|
|
>
|
|
{Reflect.apply(formatToPlainString, intl, [EQa7os, {questName: quest.config.messages.questName}])}
|
|
</Text>
|
|
);
|
|
r17 = r17 && styles.textShadow;
|
|
return (
|
|
<View style={items2}>
|
|
<View style={styles.videoContentHeading}>
|
|
{text}
|
|
<Text
|
|
variant="heading-sm/semibold"
|
|
color="white"
|
|
accessibilityLabel={r12}
|
|
style={[styles.subheader, r17]}
|
|
>
|
|
{value7 ? r14 ? value6 : quest.config.messages.gamePublisher : value6}
|
|
</Text>
|
|
</View>
|
|
{((Component) => <Component iconColor={closeButtonIconColor} onClose={onClose} />)(importDefault(13618) /* metro dependency 13618: VideoQuestModalCloseButton */)}
|
|
</View>
|
|
);
|
|
function _fun104065({videoProgress}) { // fn#104065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13822:795, offset: 0x0228321f, size: 166 bytes, params: 2, frame: 17
|
|
var r0;
|
|
var object;
|
|
var progressSeconds;
|
|
const property = videoProgress[quest.id];
|
|
if (property != null) {
|
|
r0 = property;
|
|
} else {
|
|
object = {};
|
|
progressSeconds = env0_1.progressSeconds;
|
|
object.timestampSec = progressSeconds;
|
|
object.duration = env0_1.targetSeconds;
|
|
progressSeconds = env0_1.progressSeconds;
|
|
object.maxTimestampSec = progressSeconds;
|
|
r0 = object;
|
|
}
|
|
let value = environment.__proto__;
|
|
value = Reflect.apply((require(7116) /* metro dependency 7116: QuestTaskUtils */).parseMinutesAndSecondsFromSeconds,
|
|
value, [r0.duration - r0.timestampSec]);
|
|
const questTaskUtilsModule = require(7116) /* metro dependency 7116: QuestTaskUtils */;
|
|
return questTaskUtilsModule.formatWatchTaskTime(value.minutes, value.seconds);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun104063, 13625, [31, 27, 7095, 33, 4501, 697, 13597, 9483, 7116, 3769, 9522, 4573, 1244, 13618,
|
|
2]) /* metro module 13625, dependencies: [31, 27, 7095, 33, 4501, 697, 13597, 9483, 7116, 3769, 9522, 4573, 1244, 13618, 2] */;
|