/* 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] */ import SnowflakeUtils from '../../../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */ import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */ import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */ import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */ import UserGuildSettingsStore from '../../../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */ import GetChannelA11yLabel from '../../channel/getChannelA11yLabel.tsx'; /* Metro dependency 9122 */ import ICYMIActionCreators from '../ICYMIActionCreators.tsx'; /* Metro dependency 9580 */ import ICYMICardInCard from './ICYMICardInCard.tsx'; /* Metro dependency 14856 */ import ICYMICardInteractionRow from './ICYMICardInteractionRow.tsx'; /* Metro dependency 14862 */ 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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */ import * as GetChannelA11yLabelModule from '../../channel/getChannelA11yLabel.tsx'; /* Metro dependency 9122 */ import * as ICYMIUtilsModule from '../ICYMIUtils.tsx'; /* Metro dependency 9579 */ import * as ShowLongPressMessageActionSheetModule from '../../messages/native/long_press/showLongPressMessageActionSheet.tsx'; /* Metro dependency 11401 */ import * as DesignConstantsModule from './DesignConstants.tsx'; /* Metro dependency 14853 */ import * as ICYMIMessageRowModule from './ICYMIMessageRow.tsx'; /* Metro dependency 14858 */ 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 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 = ReactModule.memo(_fun112238); (FileImportTrackerModule).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 const value3 = (FluxModule).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 = (ICYMIUtilsModule).useGravityMessage(message); object = {}; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; object.actionLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['8P08G9']); object.id = message.id; object.interactionType = 'announcement'; object.channelId = channel.id; const defaultImport2 = SnowflakeUtils; object.timestamp = defaultImport2.extractTimestamp(message.id); object.onHeaderPress = value7; object.onHeaderLongPress = value5; object.message = value8; object.shouldFeatureUser = true; const PressableHighlight = (PressablesModule).PressableHighlight; const pressableHighlightProps = {onPress: value7, onLongPress: value6, accessibilityRole: 'button', accessibilityLabel: (GetChannelA11yLabel)({channel: channel, unread: unread}), accessibilityHint: (GetChannelA11yLabelModule).getChannelA11yHint({channel: channel, muted: value3}), unstable_pressDelay: 130, style: value4.pressable}; const MessageRowContent = (ICYMIMessageRowModule).MessageRowContent; return ( {((Component) => )(ICYMICardInteractionRow)} ); 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 userGuildSettingsStoreBinding = UserGuildSettingsStore; const isChannelMuted = userGuildSettingsStoreBinding.isChannelMuted; const channelBinding = channel; return Reflect.apply(isChannelMuted, userGuildSettingsStoreBinding, [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 = 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 = 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'}}); (ShowLongPressMessageActionSheetModule).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 = 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 object = {}; object.itemId = messageBinding.id; object.itemType = 'announcement'; object.actionParameters = {'actionGestureType': 'press', 'actionTargetElement': 'item_container', 'actionIntentType': 'navigate', 'actionDestinationType': 'channel'}; Reflect.apply(feedItemActioned, defaultImport2, [object]); if (messageBinding != null) { defaultImport3 = defaultImport; ackGravityItems = defaultImport3.ackGravityItems; object = {}; messageBinding = message; id = messageBinding.id; object.id = id; object.timestamp = global.Date.now(); Reflect.apply(ackGravityItems, defaultImport3, [[object]]); value = require(14854) /* metro dependency 14854: ICYMIShared */; navigateToPost = value.navigateToPost; id = channel.id; Reflect.apply(navigateToPost, value, [id, guild.id, messageBinding.id]); } } } 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 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 = (ICYMIUtilsModule).useGravityMessage(message); const author = value3?.author; useStateFromStores = FluxModule.useStateFromStores; return ( channel == null || guild == null || (value3 == null || author == null) || Reflect.apply(useStateFromStores, FluxModule, [[RelationshipStore], function() { var relationshipStoreBinding = RelationshipStore; return relationshipStoreBinding.isBlockedOrIgnored(author?.id); }]) ? null : ((Component) => )(env0_14) ); } } global.__d(_fun112236, 14852, [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]) /* metro module 14852, 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] */;