/* Metro module 15340; source: modules/launchpad/native/shared/TextChannel.tsx; dependencies: [31, 27, 5071, 1949, 1379, 1309, 4865, 33, 4501, 15332, 697, 14436, 6860, 566, 4805, 9619, 13775, 5087, 4584, 15341, 6632, 11600, 10975, 3834, 15343, 8448, 14700, 15333, 5278, 15344, 15345, 15336, 15339, 2] */ function _fun117274(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117274, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15537:6, offset: 0x024acabe, size: 307 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = importAll(31) /* metro dependency 31 */; const env0_4 = (require(27) /* metro dependency 27 */).View; const activeJoinedThreadsStore = importDefault(5071) /* metro dependency 5071: ActiveJoinedThreadsStore */; const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const env0_8 = (require(1309) /* metro dependency 1309: FormConstants */).getThemedRippleConfig; const env0_9 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting; const value2 = require(33) /* metro dependency 33 */; const env0_10 = value2.jsx; const env0_11 = value2.jsxs; const env0_12 = (require(4501) /* metro dependency 4501: createStyles */).createStyles(_fun117275); value = value.memo(TextChannel); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/shared/TextChannel.tsx'); exports.default = value; } function _fun117275() { // fn#117275, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15537:258, offset: 0x024acbf1, size: 194 bytes, params: 1, frame: 15 const object5 = {}; const object6 = {'flex': 1, 'borderRadius': null, 'marginBottom': 1}; object6.borderRadius = (importDefault(15332) /* metro dependency 15332: getLayoutStyles */)().container.borderRadius; object5.pressable = object6; const object7 = {'position': 'absolute', 'top': 0, 'bottom': 0, 'left': 0, 'right': 0, 'borderWidth': 1}; const BORDER_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_MUTED; object7.borderColor = BORDER_MUTED; object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md; object5.selectedBorder = object7; const object8 = {}; object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md; const BACKGROUND_MOD_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_MUTED; object8.backgroundColor = BACKGROUND_MOD_MUTED; object5.rowSelected = object8; return object5; } function TextChannel({channel, subtitle, muted, navigationReplace, showGuildBadgeIcon, selected}) { // fn#117276, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15537:613, offset: 0x024accb3, size: 1341 bytes, params: 2, frame: 47 var r33; var moduleValue9; muted = !(muted === undefined) && muted; navigationReplace = !(navigationReplace === undefined) && navigationReplace; selected = !(selected === undefined) && selected; const id = channel.id; const isForumLikeChannel2 = channel.isForumLikeChannel(); const guild_id = channel.guild_id; const {newChannel, optInEnabled, unread, resolvedUnreadSetting, mentionCount, isMentionLowImportance} = (require(14436) /* metro dependency 14436: useChannelUnreadBadgeState */).useChannelUnreadBadgeState(channel, muted); const styles = useStyles(muted, unread); const threadHooksModule = require(6860) /* metro dependency 6860: ThreadHooks */; const useHasActiveThreads = threadHooksModule.useHasActiveThreads; const hasActiveThreads = Reflect.apply(useHasActiveThreads, threadHooksModule, [channel]).hasActiveThreads; const fluxModule = require(566) /* metro dependency 566: flux */; let useStateFromStores = fluxModule.useStateFromStores; const newThreadCount = Reflect.apply(useStateFromStores, fluxModule, [[ActiveJoinedThreadsStore], function() { var channelBinding = channel; return ActiveJoinedThreadsStore.getNewThreadCount(channelBinding.guild_id, channelBinding.id); }]); const moduleValue4 = fluxModule; useStateFromStores = moduleValue4.useStateFromStores; const r34 = (importDefault(4805) /* metro dependency 4805: useChannelName */)(Reflect.apply(useStateFromStores, moduleValue4, [[ChannelStore], function() { return ChannelStore.getChannel(channel.parent_id); }])) ?? undefined; const value9 = (require(9619) /* metro dependency 9619: ForumHooks */).useUnreadThreadsCountForParent(channel.guild_id, channel.id); const value11 = (importDefault(13775) /* metro dependency 13775: useMessagePreviews */)(channel, {unread: unread && !muted}); const value12 = (require(5087) /* metro dependency 5087: SpoilerChannelUtils */).useIsChannelSpoilerGated(channel); const value13 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale(); const locale = fluxModule.useStateFromStores([LocaleStore], function() { return LocaleStore.locale; }); const value14 = (importDefault(15341) /* metro dependency 15341: usePressUnderlayColor */)(); const {isSubscriptionGated, needSubscriptionToAccess} = (importDefault(6632) /* metro dependency 6632: useChannelRoleSubscriptionStatus */)(channel.id); const value16 = (importDefault(11600) /* metro dependency 11600: useEmbeddedAppsForChannel */)(channel); if (value11 == null) { moduleValue9 = require(15343) /* metro dependency 15343: ChannelSubtitle */; r33 = moduleValue9.renderChannelSubtitle({subtitle: subtitle, muted: muted, channelId: id, guildId: guild_id}); } else if (value12) { moduleValue9 = require(15343) /* metro dependency 15343: ChannelSubtitle */; r33 = moduleValue9.renderChannelSubtitle({subtitle: subtitle, muted: muted, channelId: id, guildId: guild_id}); } else { const ChannelRowPreview = (require(10975) /* metro dependency 10975: ChannelRowPreview */).ChannelRowPreview; r33 = ; } const value19 = (require(8448) /* metro dependency 8448: ActivitiesInTextUtils */).useIsActivitiesInTextEnabled(channel.id); const value21 = env0_3.useMemo(_fun117280, [value16.length > 0, value16]); const defaultImport3 = importDefault(15333) /* metro dependency 15333: renderChannelPressableWrapper */; const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight; const pressableHighlightProps = {style: [styles.pressable, selected ? styles.rowSelected : undefined], underlayColor: value14, androidRippleConfig: getThemedRippleConfig({color: value14})}; const useTextChannelPressEventsModule = require(15344) /* metro dependency 15344: useTextChannelPressEvents */; const useTextChannelPressEvents = useTextChannelPressEventsModule.useTextChannelPressEvents; copyDataProperties(pressableHighlightProps, Reflect.apply(useTextChannelPressEvents, useTextChannelPressEventsModule, [channel, navigationReplace]), undefined); const renderChannelItemModule = require(15345) /* metro dependency 15345: renderChannelItem */; const getChannelAccessibilityProps = renderChannelItemModule.getChannelAccessibilityProps; copyDataProperties(pressableHighlightProps, Reflect.apply(getChannelAccessibilityProps, renderChannelItemModule, [{channel: channel, unread: unread, mentionCount: mentionCount}]), undefined); const items2 = [selected && ]; const defaultImport4 = importDefault(15345) /* metro dependency 15345: renderChannelItem */; const object = {channel: channel, channelCategoryName: r34, subtitle: r33, hasActiveThreads: hasActiveThreads}; object.unreadBadge = ((Component) => )(importDefault(15336) /* metro dependency 15336: UnreadBadge */); object.mentionBadge = (importDefault(15339) /* metro dependency 15339: renderChannelBadge */)({newChannel: newChannel && optInEnabled, mentionCount: mentionCount, isMentionLowImportance: isMentionLowImportance, postsWithUnreadsCount: isForumLikeChannel2 && value9 > 0 ? muted || resolvedUnreadSetting !== UnreadSetting.ALL_MESSAGES ? undefined : value9 : undefined, newPostCount: isForumLikeChannel2 && value9 > 0 ? muted ? undefined : newThreadCount : undefined, locale: locale}); object.unread = unread; object.resolvedUnreadSetting = resolvedUnreadSetting; object.mentionCount = mentionCount; object.muted = muted; object.channelName = (importDefault(4805) /* metro dependency 4805: useChannelName */)(channel); object.fontScale = value13; object.isSubscriptionGated = isSubscriptionGated; object.needSubscriptionToAccess = needSubscriptionToAccess; object.showGuildBadgeIcon = showGuildBadgeIcon; object.end = value19 ? value21 : null; items2[1] = defaultImport4(object); return defaultImport3({items2}); } function _fun117280() { // fn#117280, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15537:1764, offset: 0x024ad238, size: 60 bytes, params: 1, frame: 15 return env0_2 ? ((Component) => )(importDefault(14700) /* metro dependency 14700: ChannelItemEmbeddedActivities */) : null; }