/* Metro module 14852; source: modules/icymi/native/AnnouncementMessageRow.tsx; dependencies: [31, 27, 1379, 1867, 3793, 4864, 1878, 14853, 33, 14815, 697, 566, 6593, 9580, 12129, 11401, 14854, 9579, 14856, 1244, 21, 5278, 9122, 14858, 14862, 2] */ function _fun112236(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112236, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15049:6, offset: 0x023c02f6, size: 329 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const value = importAll(31) /* metro dependency 31 */; const env0_4 = (require(27) /* metro dependency 27 */).View; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */; const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */; const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */; const userStore = importDefault(1878) /* metro dependency 1878: UserStore */; const env0_10 = (require(14853) /* metro dependency 14853: DesignConstants */).ITEM_PADDING; const value2 = require(33) /* metro dependency 33 */; const env0_11 = value2.jsx; const env0_12 = value2.jsxs; const env0_13 = (require(14815) /* metro dependency 14815: createICYMIStyles */).createICYMIStyles(function(a0) { var object = {}; object.pressable = {flex: 1, paddingLeft: a0.inset}; var object3 = {marginVertical: a0.margin}; object3.gap = importDefault(dependencyMap[10]).space.PX_8; object3.paddingHorizontal = ITEM_PADDING; object3.marginLeft = a0.inset; object.footer = object3; return object; }); const env0_14 = value.memo(_fun112238); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/icymi/native/AnnouncementMessageRow.tsx'); exports.default = AnnouncementMessageRowWrapper; } function _fun112238({unread, message, guild, channel, visible}) { // fn#112238, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15049:404, offset: 0x023c04ab, size: 767 bytes, params: 2, frame: 32 var object2; const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore], _fun112239); const value4 = env0_13(); let binding = env0_3; binding.useEffect(_fun112240, [guild?.id, message.author.id]); binding = env0_3; const value5 = binding.useCallback(_fun112241, [channel.id, message.id]); const value6 = binding.useCallback(_fun112242, [channel, message]); const value7 = binding.useCallback(_fun112243, [message, channel.id, guild.id]); const value8 = (require(9579) /* metro dependency 9579: ICYMIUtils */).useGravityMessage(message); const ICYMICardInCard = importDefault(14856) /* metro dependency 14856: ICYMICardInCard */; object2 = {}; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; object2.actionLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8P08G9']); object2.id = message.id; object2.interactionType = 'announcement'; object2.channelId = channel.id; const defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */; object2.timestamp = defaultImport2.extractTimestamp(message.id); object2.onHeaderPress = value7; object2.onHeaderLongPress = value5; object2.message = value8; object2.shouldFeatureUser = true; const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight; const pressableHighlightProps = {onPress: value7, onLongPress: value6, accessibilityRole: 'button', accessibilityLabel: (importDefault(9122) /* metro dependency 9122: getChannelA11yLabel */)({channel: channel, unread: unread}), accessibilityHint: (require(9122) /* metro dependency 9122: getChannelA11yLabel */).getChannelA11yHint({channel: channel, muted: value3}), unstable_pressDelay: 130, style: value4.pressable}; const MessageRowContent = (require(14858) /* metro dependency 14858: ICYMIMessageRow */).MessageRowContent; return ( {((Component) => )(importDefault(14862) /* metro dependency 14862: ICYMICardInteractionRow */)} ); } function AnnouncementMessageRowWrapper({unread, message, visible}) { // fn#112244, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15049:2719, offset: 0x023c0a93, size: 300 bytes, params: 2, frame: 23 const fluxModule = require(566) /* metro dependency 566: flux */; let useStateFromStores = fluxModule.useStateFromStores; const channel = Reflect.apply(useStateFromStores, fluxModule, [[ChannelStore], function() { return ChannelStore.getChannel(message.getChannelId()); }]); const guild = fluxModule.useStateFromStores([GuildStore], function() { return GuildStore.getGuild(channel?.guild_id); }); const value3 = (require(9579) /* metro dependency 9579: ICYMIUtils */).useGravityMessage(message); const author = value3?.author; const moduleValue4 = fluxModule; useStateFromStores = moduleValue4.useStateFromStores; return channel == null || guild == null || (value3 == null || author == null) || Reflect.apply(useStateFromStores, moduleValue4, [[RelationshipStore], function() { return RelationshipStore.isBlockedOrIgnored(author?.id); }]) ? null : ((Component) => )(env0_14); } function _fun112239() { // fn#112239, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15049:502, offset: 0x023c07aa, size: 43 bytes, params: 1, frame: 13 const value = environment.__proto__; const isChannelMuted = UserGuildSettingsStore.isChannelMuted; const channelBinding = channel; return Reflect.apply(isChannelMuted, UserGuildSettingsStore, [channelBinding.getGuildId(), channelBinding.id]); } function _fun112240() { // fn#112240, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15049:565, offset: 0x023c07d5, size: 107 bytes, params: 1, frame: 15 var value3; var defaultImport; const guildBinding = guild; const value2 = undefined; if ((guildBinding == null ? value2 : guild.id) != null) { value3 = environment.__proto__; defaultImport = importDefault(6593) /* metro dependency 6593: GuildActionCreators */; defaultImport.requestMembersById(guild == null ? value2 : guild.id, message.author.id); } return value2; } function _fun112241() { // fn#112241, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15049:718, offset: 0x023c0840, size: 154 bytes, params: 1, frame: 22 let value = environment.__proto__; const defaultImport = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */; const itemInteracted = defaultImport.itemInteracted; const messageBinding = message; Reflect.apply(itemInteracted, defaultImport, [messageBinding.id, 'announcement', 'long_press_channel']); defaultImport.feedItemActioned({itemId: messageBinding.id, itemType: 'announcement', actionParameters: {'actionGestureType': 'long_press', 'actionTargetElement': 'item_header', 'actionIntentType': 'open', 'actionDestinationType': 'channel'}}); value = require(12129) /* metro dependency 12129: openChannelLongPressActionSheet */; value.openChannelLongPressActionSheet(channel.id); } function _fun112242() { // fn#112242, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15049:1073, offset: 0x023c08da, size: 189 bytes, params: 1, frame: 22 const value = environment.__proto__; const defaultImport = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */; const itemInteracted = defaultImport.itemInteracted; const messageBinding = message; Reflect.apply(itemInteracted, defaultImport, [messageBinding.id, 'announcement', 'long_press_message']); defaultImport.feedItemActioned({itemId: messageBinding.id, itemType: 'announcement', actionParameters: {'actionGestureType': 'long_press', 'actionTargetElement': 'item_container', 'actionIntentType': 'open', 'actionDestinationType': 'channel'}}); (require(11401) /* metro dependency 11401: showLongPressMessageActionSheet */).showLongPressMessageActionSheet({channel: channel, message: messageBinding, user: UserStore.getUser(messageBinding.author.id)}); } function _fun112243() { // fn#112243, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15049:1478, offset: 0x023c0997, size: 252 bytes, params: 1, frame: 22 var defaultImport3; var ackGravityItems; var navigateToPost; let value = environment.__proto__; const defaultImport = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */; const itemInteracted = defaultImport.itemInteracted; let messageBinding = message; let id = messageBinding.id; Reflect.apply(itemInteracted, defaultImport, [id, 'announcement', 'press_message']); const defaultImport2 = defaultImport; const feedItemActioned = defaultImport2.feedItemActioned; let object2 = {}; object2.itemId = messageBinding.id; object2.itemType = 'announcement'; object2.actionParameters = {'actionGestureType': 'press', 'actionTargetElement': 'item_container', 'actionIntentType': 'navigate', 'actionDestinationType': 'channel'}; Reflect.apply(feedItemActioned, defaultImport2, [object2]); if (messageBinding != null) { defaultImport3 = defaultImport; ackGravityItems = defaultImport3.ackGravityItems; object2 = {}; messageBinding = message; id = messageBinding.id; object2.id = id; object2.timestamp = global.Date.now(); Reflect.apply(ackGravityItems, defaultImport3, [[object2]]); value = require(14854) /* metro dependency 14854: ICYMIShared */; navigateToPost = value.navigateToPost; id = channel.id; Reflect.apply(navigateToPost, value, [id, guild.id, messageBinding.id]); } }