/* Metro module 6913; source: modules/lurker_mode/openLurkerLeavePrompt.native.tsx; dependencies: [31, 27, 1379, 1867, 3785, 661, 33, 4497, 6819, 4501, 6914, 4500, 1244, 6915, 1305, 6927, 1314, 6929, 6593, 2] */ import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import GuildStore from '../../stores/GuildStore.tsx'; /* Metro dependency 1867 */ import LurkingStore from './LurkingStore.tsx'; /* Metro dependency 3785 */ import GuildIcon from '../guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */ import GuildBadgeV2 from '../guild/native/GuildBadgeV2.tsx'; /* Metro dependency 6915 */ 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 ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */ import * as NativeModule from '../../design/void/native.tsx'; /* Metro dependency 1305 */ import * as AlertModalNativeModule from '../../design/components/AlertModal/native/AlertModal.native.tsx'; /* Metro dependency 4500 */ import * as CreateStylesModule from '../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */ import * as GuildIconModule from '../guild/native/GuildIcon.tsx'; /* Metro dependency 6819 */ import * as LurkerPreviewAnalyticsModule from './LurkerPreviewAnalytics.tsx'; /* Metro dependency 6914 */ function _fun55035(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#55035, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7091:6, offset: 0x01373b3a, size: 427 bytes, params: 8, frame: 21 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ReactNativeModule; const env0_4 = value.StyleSheet; const env0_5 = value.View; value = require(33) /* metro dependency 33 */; const env0_10 = value.jsx; const env0_11 = value.jsxs; const env0_12 = value.Fragment; const Set = global.Set; const set = new Set(); const ImageSizes = (GuildIconModule).ImageSizes; const GuildIconSizes = (GuildIconModule).GuildIconSizes; const XLARGE = GuildIconSizes.XLARGE; const property = ImageSizes[XLARGE]; const env0_14 = (CreateStylesModule).createStyles({headerRoot: {alignItems: 'center'}, iconWrapper: {width: property, height: property, position: 'relative'}, badgeOverlay: {'position': 'absolute', 'right': -4, 'bottom': -4, 'marginRight': 0}}); (FileImportTrackerModule).fileFinishedImporting('modules/lurker_mode/openLurkerLeavePrompt.native.tsx'); exports.openLurkerLeavePrompt = openLurkerLeavePrompt; function LurkerLeavePromptModal({guild, onJoin}) { // fn#55036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7091:481, offset: 0x01373ce5, size: 607 bytes, params: 2, frame: 34 const styles = useStyles(); const value2 = ReactModule.useCallback(_fun55037, [guild.id]); const AlertModal = (AlertModalNativeModule).AlertModal; object = {title: guild.name}; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; let string = intl.string; const I1yHxc = (require(1244) /* metro dependency 1244: indexNative */).t.I1yHxc; object.content = Reflect.apply(string, intl, [I1yHxc]); const GuildIconSizes = (GuildIconModule).GuildIconSizes; const XLARGE = GuildIconSizes.XLARGE; const guildIcon = ( ); const Icon = (NativeModule).Icon; const Sizes = Icon.Sizes; const LARGE = Sizes.LARGE; object.header = ( {guildIcon} ); const jsxRuntimeEnv0_12Binding = jsxRuntimeEnv0_12; const AlertActionButton = (AlertModalNativeModule).AlertActionButton; string = intl.string; const VJlc0S = (require(1244) /* metro dependency 1244: indexNative */).t.VJlc0S; object.actions = ( <> ); return ; function _fun55037() { // fn#55037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7091:560, offset: 0x01373f44, size: 50 bytes, params: 1, frame: 12 let value = environment.__proto__; value = require(6914) /* metro dependency 6914: LurkerPreviewAnalytics */; value.trackLeavePromptLeaveClicked(guild.id); } } function openLurkerLeavePrompt(a0, {onLeave}) { // fn#55038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7091:1298, offset: 0x01373f76, size: 192 bytes, params: 3, frame: 19 var guild; const env0_0 = a0; const binding = env0_13; if (!binding.has(a0)) { guild = GuildStore.getGuild(a0); if (guild != null) { env0_13.add(a0); (require(4497) /* metro dependency 4497: useAlertStoreNative */).openAlert('lurker-leave-prompt:' + a0, , _fun55040); } else { onLeave(); } } function onJoin() { // fn#55039, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7091:1494, owner: openLurkerLeavePrompt.onJoin, offset: 0x01374036, size: 261 bytes, params: 1, frame: 20 var channelStoreBinding; var value4; var moduleValue; const binding = env0_0; let value = environment.__proto__; const lurkingSourceForGuild = LurkingStore.getLurkingSourceForGuild(binding); const value3 = undefined; const type = lurkingSourceForGuild == null ? value3 : lurkingSourceForGuild.type; const DIRECTORY_ENTRY = JoinGuildSources.DIRECTORY_ENTRY; if (type === DIRECTORY_ENTRY) { channelStoreBinding = ChannelStore; value4 = channelStoreBinding.getChannel(lurkingSourceForGuild.directoryChannelId); if (value4 != null) { moduleValue = require(6927) /* metro dependency 6927: HubProgressActionCreators */; moduleValue.setHubProgressActionComplete(value4.getGuildId(), (require(1314) /* metro dependency 1314: preloaded_user_settings */).HubProgressStep.JOIN_GUILD); } } const trackJoinClicked = LurkerPreviewAnalyticsModule.trackJoinClicked; let LEAVE_PROMPT_LURKER = JoinGuildSources.LEAVE_PROMPT_LURKER; value = importDefault(6929) /* metro dependency 6929: LurkerPreviewManager */; Reflect.apply(trackJoinClicked, LurkerPreviewAnalyticsModule, [binding, LEAVE_PROMPT_LURKER, value.hasNavigatedAway(binding)]); value = importDefault(6593) /* metro dependency 6593: GuildActionCreators */; const joinGuild = value.joinGuild; LEAVE_PROMPT_LURKER = JoinGuildSources.LEAVE_PROMPT_LURKER; Reflect.apply(joinGuild, value, [binding, {source: LEAVE_PROMPT_LURKER}]); return value3; } function _fun55040() { // fn#55040, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7091:1892, offset: 0x0137413b, size: 45 bytes, params: 1, frame: 12 env1_13.delete(env0_0); if (!env0_2) { onLeave(); } } } } global.__d(_fun55035, 6913, [31, 27, 1379, 1867, 3785, 661, 33, 4497, 6819, 4501, 6914, 4500, 1244, 6915, 1305, 6927, 1314, 6929, 6593, 2]) /* metro module 6913, dependencies: [31, 27, 1379, 1867, 3785, 661, 33, 4497, 6819, 4501, 6914, 4500, 1244, 6915, 1305, 6927, 1314, 6929, 6593, 2] */;