/* Metro module 14882; source: modules/icymi/native/ICYMIForumThreadRow.tsx; dependencies: [31, 27, 1379, 1867, 33, 14815, 697, 566, 6593, 9580, 14854, 12129, 9579, 4805, 14856, 1244, 21, 5278, 4573, 6622, 14860, 14862, 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 GuildStore from '../../../stores/GuildStore.tsx'; /* Metro dependency 1867 */ import ICYMIActionCreators from '../ICYMIActionCreators.tsx'; /* Metro dependency 9580 */ 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 TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */ import * as ICYMIUtilsModule from '../ICYMIUtils.tsx'; /* Metro dependency 9579 */ import * as CreateICYMIStylesModule from './createICYMIStyles.tsx'; /* Metro dependency 14815 */ function _fun112588(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#112588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15079:6, offset: 0x023d37bd, size: 263 bytes, params: 8, frame: 20 const env0_0 = require; const ICYMIForumThreadRow2 = ICYMIForumThreadRow; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_9 = (CreateICYMIStylesModule).createICYMIStyles(_fun112595); (FileImportTrackerModule).fileFinishedImporting('modules/icymi/native/ICYMIForumThreadRow.tsx'); exports.default = ForumThreadRowWrapper; exports.MAX_AVATARS_IN_PILE = 3; exports.ICYMIForumThreadRow = ICYMIForumThreadRow2; function ICYMIForumThreadRow({channel, message, visible}) { // fn#112589, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15079:551, offset: 0x023d38c4, size: 996 bytes, params: 2, frame: 38 var r0; var ICYMICardInCard; var intl; var defaultImport2; var extractTimestamp; var PressableHighlight; const Text = (TextModule).Text; var items3; var defaultImport3; var items2; var value; const value3 = env0_9(); const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun112590); const author = message.author; const author2 = author; const channel2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() { return ChannelStore.getChannel(channel.parent_id); }); let binding = author2; const useEffect = binding.useEffect; let id = author.id; Reflect.apply(useEffect, binding, [_fun112592, [id, guild?.id]]); binding = author2; let useCallback = binding.useCallback; const value5 = Reflect.apply(useCallback, binding, [_fun112593, [channel, guild, message.id]]); binding = author2; useCallback = binding.useCallback; object = [channel.parent_id]; object[1] = message.id; const value6 = Reflect.apply(useCallback, binding, [_fun112594, object]); const value7 = (ICYMIUtilsModule).useGravityMessage(message); if (channel == null) { r0 = null; } else if (channel.guild_id == null) { r0 = null; } else if (guild == null) { r0 = null; } else if (author == null) { r0 = null; } else if (channel2 == null) { r0 = null; } else { ICYMICardInCard = importDefault(14856) /* metro dependency 14856: ICYMICardInCard */; object = {}; intl = (require(1244) /* metro dependency 1244: indexNative */).intl; object.actionLabel = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.bYNuVx); id = value7.id; object.id = id; object.interactionType = 'forum_thread'; object.channelId = channel.parent_id; defaultImport2 = importDefault(21) /* metro dependency 21: SnowflakeUtils */; extractTimestamp = defaultImport2.extractTimestamp; id = value7.id; object.timestamp = Reflect.apply(extractTimestamp, defaultImport2, [id]); object.onHeaderPress = value5; object.onHeaderLongPress = value6; object.message = value7; object.shouldFeatureUser = true; PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight; var pressableHighlightProps = {onPress: value5, onLongPress: value6, accessibilityRole: 'button', unstable_pressDelay: 130, style: value3.pressable}; var viewBindingProps = {style: value3.container}; items3 = [ {(importDefault(4805) /* metro dependency 4805: useChannelName */)(channel)} , ]; var textProps = {'variant': 'text-md/normal', 'color': 'text-subtle', 'style': null, 'lineClamp': 5, style: value3.subtitle}; defaultImport3 = importDefault(6622) /* metro dependency 6622: MarkupUtils */; items3[1] = ( {defaultImport3.parseInlineReply(message.content, true)} ); items3[2] = ((Component) => )(importDefault(14860) /* metro dependency 14860: ICYMIMediaMosaic */); items2 = [ {items3} , ]; var viewBindingProps2 = {style: value3.footer}; var viewBinding2Props = {style: value3.ICYMICardInteractionRow}; value = importDefault(14862) /* metro dependency 14862: ICYMICardInteractionRow */; id = value7.id; items2[1] = ( {((Component) => )(value)} ); value = ( {items2} ); r0 = value; } return r0; function _fun112590() { // fn#112590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15079:657, offset: 0x023d3ca8, size: 52 bytes, params: 1, frame: 13 const value = environment.__proto__; return GuildStore.getGuild(channel?.getGuildId()); } function _fun112592() { // fn#112592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15079:795, offset: 0x023d3cfc, size: 109 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, [author.id]); } return value2; } function _fun112593() { // fn#112593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15079:935, offset: 0x023d3d69, size: 204 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, 'forum_thread', 'press_forum_thread']); defaultImport.feedItemActioned({itemId: messageBinding.id, itemType: 'forum_thread', actionParameters: {'actionGestureType': 'press', 'actionTargetElement': 'item_container', 'actionIntentType': 'navigate', 'actionDestinationType': 'channel'}}); if (channel != null && guild != null) { value = require(14854) /* metro dependency 14854: ICYMIShared */; value.navigateToPost(channel.id, guild.id, message.id); } } function _fun112594() { // fn#112594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15079:1300, offset: 0x023d3e35, size: 178 bytes, params: 1, frame: 22 var value2; var defaultImport; var itemInteracted; var messageBinding; var id; var defaultImport2; var feedItemActioned; var moduleValue; if (channel.parent_id != null) { value2 = environment.__proto__; defaultImport = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */; itemInteracted = defaultImport.itemInteracted; messageBinding = message; id = messageBinding.id; Reflect.apply(itemInteracted, defaultImport, [id, 'forum_thread', 'long_press_forum_thread']); defaultImport2 = importDefault(9580) /* metro dependency 9580: ICYMIActionCreators */; feedItemActioned = defaultImport2.feedItemActioned; id = messageBinding.id; Reflect.apply(feedItemActioned, defaultImport2, [{itemId: id, itemType: 'forum_thread', actionParameters: {'actionGestureType': 'long_press', 'actionTargetElement': 'item_container', 'actionIntentType': 'open', 'actionDestinationType': null}}]); moduleValue = require(12129) /* metro dependency 12129: openChannelLongPressActionSheet */; moduleValue.openChannelLongPressActionSheet(channel.parent_id); } } } function _fun112595(a0) { // fn#112595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15079:197, offset: 0x023d3ee7, size: 201 bytes, params: 2, frame: 14 const object = {}; object.pressable = {flex: 1, paddingLeft: a0.inset}; object.container = {marginHorizontal: a0.margin}; const PX_8 = (Native).space.PX_8; object.subtitle = {marginTop: PX_8, marginBottom: a0.margin}; object.footer = {justifyContent: 'flex-end', paddingLeft: a0.inset, marginTop: a0.margin, gap: a0.margin}; object.threadAsComments = {marginHorizontal: a0.margin}; object.ICYMICardInteractionRow = {marginHorizontal: a0.margin, marginBottom: a0.margin}; return object; } function ForumThreadRowWrapper({message, threadChannel, visible}) { // fn#112596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15079:2763, offset: 0x023d3fb0, size: 56 bytes, params: 2, frame: 15 return ( ); } } global.__d(_fun112588, 14882, [31, 27, 1379, 1867, 33, 14815, 697, 566, 6593, 9580, 14854, 12129, 9579, 4805, 14856, 1244, 21, 5278, 4573, 6622, 14860, 14862, 2]) /* metro module 14882, dependencies: [31, 27, 1379, 1867, 33, 14815, 697, 566, 6593, 9580, 14854, 12129, 9579, 4805, 14856, 1244, 21, 5278, 4573, 6622, 14860, 14862, 2] */;