/* Metro module 9542; source: modules/quests/native/QuestRewardTile.tsx; dependencies: [57, 31, 27, 4502, 33, 4501, 697, 477, 566, 9500, 9495, 9543, 5475, 2] */ import React from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */ import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */ import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */ 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 AssetUtilsModule from '../lib/AssetUtils.tsx'; /* Metro dependency 9495 */ import * as QuestRewardUtilsModule from '../utils/QuestRewardUtils.tsx'; /* Metro dependency 9500 */ function _fun74440(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#74440, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:6, offset: 0x01d8d9ce, size: 253 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_10 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(function() { var object2 = {'borderRadius': null, 'display': 'flex', 'justifyContent': 'center', 'alignItems': 'center', 'overflow': 'hidden'}; object2.borderRadius = importDefault(dependencyMap[6]).radii.sm; return {container: object2, video: {'overflow': 'hidden', 'height': '100%', 'width': '100%'}, image: {'height': '100%', 'width': '100%'}}; }); (FileImportTrackerModule).fileFinishedImporting('modules/quests/native/QuestRewardTile.tsx'); exports.default = QuestRewardTile; function QuestRewardTile({quest, height, width, style, paused, withAnimation, accessibilityLabelPrefix}) { // fn#74442, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:517, offset: 0x01d8db31, size: 666 bytes, params: 2, frame: 27 var r4; var r9; var value; var VideoComponent; paused = !(paused === undefined) && paused; if (withAnimation !== undefined) { r4 = withAnimation; } else { value = require(477) /* metro dependency 477: PlatformUtils */; value = value.isIOS(); r4 = value; } let env0_4 = undefined; const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() { return AccessibilityStore.useReducedMotion; }); const value2 = useMemo(_fun74444, [quest]); let name = value2.name; name = name != null ? value2.name : value2.messages.name; const value3 = useMemo(_fun74445, [quest]); const env0_3 = value3; const styles = useStyles(); const binding = env0_4; const useState = binding.useState; const value5 = env0_3(Reflect.apply(useState, binding, [AppState.currentState === 'active']), 2); const property = value5[0]; env0_4 = value5[1]; binding.useEffect(_fun74446, [value3.isAnimated]); const value6 = binding.useMemo(_fun74449, [value3, width, height]); items2 = [accessibilityLabelPrefix, name]; const filter = items2.filter; const Boolean = global.Boolean; const value8 = Reflect.apply(filter, items2, [Boolean]).join(', '); const items3 = [styles.container]; items3[1] = {height: height, width: width}; items3[2] = style; if (value3.isAnimated) { if (r4) { VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent; value = !property; r9 = property ? paused : value; r9 = !r9 ? useReducedMotion : r9; value = ( ); r4 = value; } else { value = importDefault(5475) /* metro dependency 5475: FastImage */; value = ((Component) => )(value); r4 = value; } } else { value = importDefault(5475) /* metro dependency 5475: FastImage */; value = ((Component) => )(value); r4 = value; } return ( {r4} ); function _fun74444() { // fn#74444, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:717, offset: 0x01d8ddcb, size: 45 bytes, params: 1, frame: 11 const value = environment.__proto__; return (QuestRewardUtilsModule).getQuestPrimaryReward(quest); } function _fun74445() { // fn#74445, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:811, offset: 0x01d8ddf8, size: 75 bytes, params: 1, frame: 18 let value = environment.__proto__; value = require(9495) /* metro dependency 9495: AssetUtils */; const getQuestAsset = value.getQuestAsset; const questBinding = quest; const QuestAssetType = (require(9495) /* metro dependency 9495: AssetUtils */).QuestAssetType; const REWARD = QuestAssetType.REWARD; return Reflect.apply(getQuestAsset, value, [questBinding, REWARD, undefined, true]); } function _fun74446() { // fn#74446, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:970, offset: 0x01d8de43, size: 65 bytes, params: 1, frame: 14 var environment; if (env0_3.isAnimated) { value = environment.__proto__; var env0_0 = AppState.addEventListener('change', _fun74447); return _fun74448; } function _fun74447(a0) { // fn#74447, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:1027, offset: 0x01d8de84, size: 27 bytes, params: 2, frame: 12 env1_4(a0 === 'active'); } function _fun74448() { // fn#74448, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:1056, offset: 0x00cd0cb3, size: 21 bytes, params: 1, frame: 9 env0_0.remove(); } } function _fun74449() { // fn#74449, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9728:1109, offset: 0x01d8de9f, size: 73 bytes, params: 1, frame: 13 const value = environment.__proto__; return (AssetUtilsModule).getScaledImageUrl({assetUrl: env0_3.url, width: width, height: height}); } } } global.__d(_fun74440, 9542, [57, 31, 27, 4502, 33, 4501, 697, 477, 566, 9500, 9495, 9543, 5475, 2]) /* metro module 9542, dependencies: [57, 31, 27, 4502, 33, 4501, 697, 477, 566, 9500, 9495, 9543, 5475, 2] */;