/* Metro module 10204; source: modules/oauth2/native/SuccessResult.tsx; dependencies: [31, 27, 1379, 3784, 1934, 661, 1483, 33, 4501, 697, 7717, 1244, 5080, 6947, 683, 566, 4080, 4015, 1583, 6618, 10205, 4573, 4578, 2] */ import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */ import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import SelectedChannelStore from '../../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */ import PermissionStore from '../../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */ import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */ import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */ import Module10205 from '../../../by-id/module-10205.js'; /* Metro dependency 10205 */ 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 AppLauncherNativeConstantsModule from '../../app_launcher/native/AppLauncherNativeConstants.tsx'; /* Metro dependency 1483 */ import * as ChatInputUtilsModule from '../../../utils/native/ChatInputUtils.tsx'; /* Metro dependency 4015 */ 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 SafeAreaViewModule from '../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */ import * as DeviceOrientationModule from '../../device/native/DeviceOrientation.tsx'; /* Metro dependency 7717 */ function _fun79334(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#79334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10390:6, offset: 0x01e4e507, size: 519 bytes, params: 8, frame: 23 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactNativeModule; const env0_4 = value.Image; const env0_5 = value.View; const env0_6 = value.ScrollView; value = require(661) /* metro dependency 661: Constants */; const env0_10 = value.AnalyticEvents; const env0_11 = value.Permissions; value = require(33) /* metro dependency 33 */; const env0_13 = value.jsx; const env0_14 = value.jsxs; const env0_15 = value.Fragment; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; object = {}; const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER; object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOWER}; object.scrollView = {flex: 1}; const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW; object.scrollViewContentContainer = {'height': '100%', 'backgroundColor': null, 'alignItems': 'center', 'justifyContent': 'center', backgroundColor: BACKGROUND_BASE_LOW}; object.inner = {'flexDirection': 'column', 'alignItems': 'center', 'justifyContent': 'center', 'paddingHorizontal': 16}; object.text = {'marginTop': 24, 'paddingHorizontal': 40, 'textAlign': 'center'}; object.footer = {'flexDirection': 'column', 'justifyContent': 'space-between', 'padding': 16, 'gap': 16}; object.footerLandscape = {'flexDirection': 'row-reverse', 'padding': 16}; object.footerPortrait = {'flexDirection': 'column', 'padding': 16}; const env0_16 = Reflect.apply(createStyles, value, [object]); (FileImportTrackerModule).fileFinishedImporting('modules/oauth2/native/SuccessResult.tsx'); exports.default = SuccessResultModal; function SuccessResultModal({guild, application}) { // fn#79335, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10390:981, offset: 0x01e4e70e, size: 1253 bytes, params: 2, frame: 39 const Text = (TextModule).Text; const Button = (ButtonNativeModule).Button; let env0_3 = undefined; const styles = useStyles(); const useStore = DeviceOrientationModule.useStore; const orientation = Reflect.apply(useStore, DeviceOrientationModule, []).orientation; let binding = env0_3; const value3 = binding.useMemo(_fun79336, [application, guild]); const value5 = binding.useCallback(_fun79337, [guild, application?.id]); const channelId = (require(566) /* metro dependency 566: flux */).useStateFromStores([SelectedChannelStore], function() { return SelectedChannelStore.getChannelId(); }); env0_3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() { return ChannelStore.getChannel(channelId); }); binding = env0_3; const value6 = binding.useCallback(_fun79340, [application, channelId]); const value7 = binding.useCallback(function() { var value2 = undefined; importDefault(dependencyMap[12]).pop(); var defaultImport2 = importDefault(dependencyMap[14]); var track = defaultImport2.track; var OAUTH2_AUTHORIZE_SUCCESS_CLOSE_CLICKED = AnalyticEvents.OAUTH2_AUTHORIZE_SUCCESS_CLOSE_CLICKED; Reflect.apply(track, defaultImport2, [OAUTH2_AUTHORIZE_SUCCESS_CLOSE_CLICKED, {application_id: application == null ? value2 : application.id}]); return value2; }, [application?.id]); env0_3.useEffect(function() { var value2 = undefined; var defaultImport = importDefault(dependencyMap[14]); var track = defaultImport.track; var OAUTH2_AUTHORIZE_SUCCESS_VIEWED = AnalyticEvents.OAUTH2_AUTHORIZE_SUCCESS_VIEWED; Reflect.apply(track, defaultImport, [OAUTH2_AUTHORIZE_SUCCESS_VIEWED, {application_id: application == null ? value2 : application.id}]); return value2; }, [application?.id]); const value8 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], function() { var permissionStoreBinding = PermissionStore; var SEND_MESSAGES = Permissions.SEND_MESSAGES; return permissionStoreBinding.can(SEND_MESSAGES, channel); }); const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView; const items2 = [ , ]; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; items2[1] = ( {intl.string((require(1244) /* metro dependency 1244: indexNative */).t.se5gLj)} ); items2[2] = ( value3 != null ? ( {value3} ) : null ); const scrollView = ( {items2} ); const items3 = [styles.footer]; const OrientationType = DeviceOrientationModule.OrientationType; const LANDSCAPE = OrientationType.LANDSCAPE; items3[1] = orientation === LANDSCAPE ? styles.footerLandscape : styles.footerPortrait; return ( {scrollView} <> { guild != null ? (