215 lines
13 KiB
TypeScript
215 lines
13 KiB
TypeScript
/* Metro module 10122; source: modules/collectibles/native/OrbBadgeCollectedModal.tsx; dependencies: [31, 27, 4502, 33, 4501, 697, 5282, 5080, 10069, 10123, 566, 5475, 10142, 9543, 10143, 6618, 10063, 4573, 1244, 4578, 7613, 10066, 5280, 2] */
|
|
import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */
|
|
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
|
|
import Orb_profile_badge_icon2xPng from '../../../external/discord_assets/assets/orbs/orb_profile_badge_icon-2x.png.js'; /* Metro dependency 10063 */
|
|
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
|
|
import * as NavigatorNativeModule from '../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
|
|
import * as NavigatorHeaderNativeModule from '../../../design/components/Navigator/native/NavigatorHeader.native.tsx'; /* Metro dependency 5282 */
|
|
import * as SafeAreaViewModule from '../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
|
|
import * as CollectiblesUtilsModule from './CollectiblesUtils.tsx'; /* Metro dependency 10066 */
|
|
import * as HooksModule from '../../virtual_currency/hooks/index.tsx'; /* Metro dependency 10069 */
|
|
import * as NativeModule from '../../virtual_currency/native/index.tsx'; /* Metro dependency 10123 */
|
|
|
|
function _fun79002(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79002, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:6, offset: 0x01e40cd1, size: 522 bytes, params: 8, frame: 24
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = ReactNativeModule;
|
|
const StyleSheet = value.StyleSheet;
|
|
const env0_4 = value.View;
|
|
value = require(33) /* metro dependency 33 */;
|
|
const env0_6 = value.jsx;
|
|
const env0_7 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
object.root = {flex: 1};
|
|
const object3 = {};
|
|
copyDataProperties(object3, StyleSheet.absoluteFillObject, undefined);
|
|
object.background = object3;
|
|
object.orbBadge = {'width': 172, 'height': 172, 'alignSelf': 'center'};
|
|
object.main = {flex: 1};
|
|
const object5 = {'paddingTop': '50%', 'padding': null, 'flex': 1, 'justifyContent': 'space-between'};
|
|
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object5.padding = PX_16;
|
|
let PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
|
object5.gap = PX_32;
|
|
object.body = object5;
|
|
PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
|
|
object.bottomContainer = {'alignSelf': 'flex-end', 'alignItems': 'stretch', 'gap': null, 'width': '100%',
|
|
gap: PX_32};
|
|
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object.textContainer = {alignItems: 'center', gap: PX_8};
|
|
object.text = {textAlign: 'center'};
|
|
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object.buttonsContainer = {alignItems: 'stretch', gap: PX_16};
|
|
const env0_8 = Reflect.apply(createStyles, value, [object]);
|
|
object = {ROOT: 'ROOT'};
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/collectibles/native/OrbBadgeCollectedModal.tsx');
|
|
exports.default = OrbBadgeCollectedModal;
|
|
function OrbBadgeCollectedRootScreen({modalKey, onPressViewBadge}) { // fn#79003, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:1185, offset: 0x01e40edb, size: 1049 bytes, params: 2, frame: 41
|
|
var r5;
|
|
var VideoComponent;
|
|
var object2;
|
|
const styles = useStyles();
|
|
const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore],
|
|
function() {
|
|
return AccessibilityStore.useReducedMotion;
|
|
});
|
|
const value2 = ReactModule.useCallback(function() {
|
|
onPressViewBadge();
|
|
}, [onPressViewBadge]);
|
|
const value3 = ReactModule.useCallback(_fun79006, [modalKey]);
|
|
if (useReducedMotion) {
|
|
r5 = ((Component) => <Component source={{uri: importDefault(10142) /* metro dependency 10142: quest_reward_mobile_bg_staticPng */}} style={styles.background} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
|
} else {
|
|
VideoComponent = (require(9543) /* metro dependency 9543: Video */).VideoComponent;
|
|
object2 = {};
|
|
object2.uri = importDefault(10143) /* metro dependency 10143: quest_reward_mobile_bgMp4 */;
|
|
r5 = (
|
|
<VideoComponent
|
|
source={object2}
|
|
poster={importDefault(10142) /* metro dependency 10142: quest_reward_mobile_bg_staticPng */}
|
|
style={styles.background}
|
|
resizeMode="contain"
|
|
muted
|
|
pauseWhileAppInactive
|
|
paused={false}
|
|
/>
|
|
);
|
|
}
|
|
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
|
|
const value6 = ((Component) => <Component source={{uri: Orb_profile_badge_icon2xPng}} style={styles.orbBadge} />)(importDefault(5475) /* metro dependency 5475: FastImage */);
|
|
const Text = (TextModule).Text;
|
|
let text = styles.text;
|
|
const intl = (IndexNativeModule).intl;
|
|
let string = intl.string;
|
|
const Bal8Cv = (IndexNativeModule).t.Bal8Cv;
|
|
const text2 = (
|
|
<Text
|
|
variant="heading-xl/bold"
|
|
color="always-white"
|
|
style={text}
|
|
>
|
|
{Reflect.apply(string, intl, [Bal8Cv])}
|
|
</Text>
|
|
);
|
|
text = styles.text;
|
|
string = intl.string;
|
|
const B25MUf = (IndexNativeModule).t.B25MUf;
|
|
const view = (
|
|
<View style={styles.textContainer}>
|
|
{text2}
|
|
<Text
|
|
variant="text-sm/medium"
|
|
color="always-white"
|
|
style={text}
|
|
>
|
|
{Reflect.apply(string, intl, [B25MUf])}
|
|
</Text>
|
|
</View>
|
|
);
|
|
const Button = (ButtonNativeModule).Button;
|
|
return (
|
|
<View style={styles.root}>
|
|
{r5}
|
|
<SafeAreaPaddingView
|
|
style={styles.main}
|
|
top
|
|
bottom
|
|
left
|
|
right
|
|
>
|
|
<View style={styles.body}>
|
|
{value6}
|
|
<View style={styles.bottomContainer}>
|
|
{view}
|
|
<View style={styles.buttonsContainer}>
|
|
<Button
|
|
onPress={value2}
|
|
variant="primary"
|
|
size="lg"
|
|
text={intl.string((IndexNativeModule).t.uYLGci)}
|
|
/>
|
|
<Button
|
|
onPress={value3}
|
|
variant="secondary"
|
|
size="lg"
|
|
text={intl.string((IndexNativeModule).t['6gF4aS'])}
|
|
/>
|
|
</View>
|
|
</View>
|
|
</View>
|
|
</SafeAreaPaddingView>
|
|
</View>
|
|
);
|
|
function _fun79006() { // fn#79006, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:1375, offset: 0x01e412f4, size: 45 bytes, params: 1, frame: 12
|
|
let value = environment.__proto__;
|
|
value = importDefault(5080) /* metro dependency 5080: ModalActionCreators */;
|
|
value.popWithKey(modalKey);
|
|
}
|
|
|
|
}
|
|
|
|
function screens(a0, a1, a2) { // fn#79007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:736, offset: 0x01e41321, size: 98 bytes, params: 4, frame: 5
|
|
const env0_0 = a0;
|
|
const env0_1 = a1;
|
|
const env0_2 = a2;
|
|
const ROOT = env0_9.ROOT;
|
|
return {[ROOT]: {'render': null, 'ignoreKeyboard': true, 'fullscreen': true, 'headerLeft': null,
|
|
'headerRight': null, 'title': '', render: render_79008, headerLeft: headerLeft_79009,
|
|
headerRight: headerRight_79012}};
|
|
function screensRender() { // fn#79008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:764, owner: screens.render, offset: 0x01e41383, size: 44 bytes, params: 1, frame: 14
|
|
return <OrbBadgeCollectedRootScreen modalKey={env0_0} onPressViewBadge={require} />;
|
|
}
|
|
|
|
function screensHeaderLeft() { // fn#79009, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:874, owner: screens.headerLeft, offset: 0x01e413af, size: 25 bytes, params: 1, frame: 11
|
|
return HeaderLeft(env0_0);
|
|
function HeaderLeft(a0) { // fn#79010, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:878, owner: screens.headerLeft.HeaderLeft, offset: 0x01e413c8, size: 75 bytes, params: 2, frame: 14
|
|
const env0_0 = a0;
|
|
return ((Component) => <Component tintColor="white" />)((NavigatorHeaderNativeModule).getHeaderCloseButton(_fun79011));
|
|
function _fun79011() { // fn#79011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:937, offset: 0x01e41413, size: 45 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
return (ModalActionCreators).popWithKey(env0_0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function screensHeaderRight() { // fn#79012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:1013, owner: screens.headerRight, offset: 0x01e41440, size: 90 bytes, params: 1, frame: 16
|
|
const useFetchVirtualCurrencyBalance = HooksModule.useFetchVirtualCurrencyBalance;
|
|
const balance = Reflect.apply(useFetchVirtualCurrencyBalance, HooksModule, []).balance;
|
|
const BalanceWidgetPill = (NativeModule).BalanceWidgetPill;
|
|
return <BalanceWidgetPill initialRenderedBalance={importDefault} balance={balance} />;
|
|
}
|
|
|
|
}
|
|
|
|
function OrbBadgeCollectedModal({modalKey, onPressViewBadge, orbBalancePriorToPurchase}) { // fn#79013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:2521, offset: 0x01e4149a, size: 125 bytes, params: 2, frame: 19
|
|
ReactModule.useEffect(_fun79014, []);
|
|
const Navigator = (NavigatorNativeModule).Navigator;
|
|
const navigatorProps = {screens: screens(modalKey, onPressViewBadge, orbBalancePriorToPurchase)};
|
|
const ROOT = env0_9.ROOT;
|
|
navigatorProps.initialRouteName = ROOT;
|
|
return <Navigator {...navigatorProps} />;
|
|
function _fun79014() { // fn#79014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10308:2634, offset: 0x01e41517, size: 75 bytes, params: 1, frame: 15
|
|
let value = environment.__proto__;
|
|
value = require(7613) /* metro dependency 7613: UserProfileActionCreators */;
|
|
value.pinUserProfileBadgesOnClient([(CollectiblesUtilsModule).createOrbProfileBadge()],
|
|
600);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun79002, 10122, [31, 27, 4502, 33, 4501, 697, 5282, 5080, 10069, 10123, 566, 5475, 10142, 9543, 10143,
|
|
6618, 10063, 4573, 1244, 4578, 7613, 10066, 5280,
|
|
2]) /* metro module 10122, dependencies: [31, 27, 4502, 33, 4501, 697, 5282, 5080, 10069, 10123, 566, 5475, 10142, 9543, 10143, 6618, 10063, 4573, 1244, 4578, 7613, 10066, 5280, 2] */;
|