/* Metro module 12067; source: modules/navbars/native/components/ChannelNavbar.tsx; dependencies: [31, 27, 4257, 1383, 1379, 1867, 4396, 3793, 1878, 661, 1386, 1376, 33, 4501, 6597, 697, 566, 1244, 6647, 4805, 8829, 12068, 12069, 1305, 9713, 12070, 5475, 9711, 8581, 5278, 4573, 3995, 8419, 8792, 3968, 1365, 10357, 12071, 2] */ function _fun92711(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#92711, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12253:6, offset: 0x02095cb4, size: 819 bytes, params: 8, frame: 28 var object3; 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 gatewayConnectionStore = importDefault(4257) /* metro dependency 4257: GatewayConnectionStore */; const env0_6 = (require(1383) /* metro dependency 1383: ChannelRecord */).THREAD_CHANNEL_TYPES; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */; const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */; const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */; const userStore = importDefault(1878) /* metro dependency 1878: UserStore */; const constantsModule = require(661) /* metro dependency 661: Constants */; const Fonts = constantsModule.Fonts; const env0_12 = constantsModule.ChannelTypes; const env0_13 = (require(1386) /* metro dependency 1386: ChannelConstants */).StaticChannelRoute; const dismissibleContentConstantsModule = require(1376) /* metro dependency 1376: DismissibleContentConstants */; const env0_14 = dismissibleContentConstantsModule.ContentDismissActionType; const env0_15 = dismissibleContentConstantsModule.DismissibleContentGroupName; const value4 = require(33) /* metro dependency 33 */; const env0_16 = value4.jsx; const env0_17 = value4.jsxs; const createStylesModule = require(4501) /* metro dependency 4501: createStyles */; const createStyles = createStylesModule.createStyles; object3 = {navbarTitleContainer: {'height': '100%', 'flex': 1, 'flexDirection': 'row', 'alignItems': 'center'}}; const object4 = {}; const textStyles = importDefault(6597) /* metro dependency 6597: TextStyles */; const DISPLAY_SEMIBOLD = Fonts.DISPLAY_SEMIBOLD; const MOBILE_TEXT_HEADING_PRIMARY = (importDefault(697) /* metro dependency 697: native */).colors.MOBILE_TEXT_HEADING_PRIMARY; copyDataProperties(object4, textStyles(DISPLAY_SEMIBOLD, MOBILE_TEXT_HEADING_PRIMARY, 18), undefined); object4['flexShrink'] = 1; object3.navbarTitlePrimaryText = object4; let TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED; object3.navbarTitleSecondaryText = {'fontSize': 12, 'lineHeight': 16, 'color': null, 'marginTop': -4, color: TEXT_MUTED}; object3.channelIcon = {'height': 18, 'width': 18, 'marginRight': 8}; const CHANNEL_ICON = (importDefault(697) /* metro dependency 697: native */).colors.CHANNEL_ICON; object3.channelIconColor = {color: CHANNEL_ICON}; TEXT_MUTED = (importDefault(697) /* metro dependency 697: native */).colors.TEXT_MUTED; object3.homeIcon = {'height': 20, 'width': 20, 'tintColor': null, 'marginTop': 0, 'marginRight': 8, tintColor: TEXT_MUTED}; object3.premiumIcon = {marginRight: 4}; object3.status = {'marginLeft': 1, 'marginTop': 4}; object3.channelTextContainer = {'flex': 1, 'flexGrow': 1}; object3.channelNameContainer = {flexGrow: 1}; object3.channelName = {textAlign: 'left'}; object3.flexRow = {'flexDirection': 'row', 'alignItems': 'center'}; const env0_18 = Reflect.apply(createStyles, createStylesModule, [object3]); value = value.memo(_fun92712); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/navbars/native/components/ChannelNavbar.tsx'); exports.ChannelTitleWithoutRoute = ChannelTitleWithoutRoute; exports.ChannelTitle = value; exports.ChannelButtons = ChannelButtons; } function _fun92712({onPressTitle, channelId, guildId, threadDraft, style}) { // fn#92712, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12253:1130, offset: 0x02095fe7, size: 2054 bytes, params: 2, frame: 33 var r14; var moduleValue6; var moduleValue7; var channelName; var channelIconWithGuild; var isThread2; var formatToPlainString; var recipientId; var moduleValue9; const styles = useStyles(); const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GatewayConnectionStore], function() { return GatewayConnectionStore.isConnected(); }); const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun92714); const guild = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildStore], _fun92715); const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun92716, [value4, threadDraft]); const value6 = (require(12068) /* metro dependency 12068: NavigationPathUtils */).useSelectedSpecialNavigationPath(); const value7 = (importDefault(12069) /* metro dependency 12069: useIsViewingPremiumMemberships */)(); const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const string = intl.string; const t = (require(1244) /* metro dependency 1244: indexNative */).t; const r13 = value3 ? Reflect.apply(string, intl, [t.ai6Lbr]) : Reflect.apply(string, intl, [t.ZTNur7]); const SpecialNavigationPath = (require(12068) /* metro dependency 12068: NavigationPathUtils */).SpecialNavigationPath; const FRIENDS = SpecialNavigationPath.FRIENDS; if (value6 === FRIENDS) { return ( ); } const GUILD_HOME = StaticChannelRoute.GUILD_HOME; if (channelId === GUILD_HOME) { return ( )((require(1305) /* metro dependency 1305: native */).Icon)} /> ); } const MEMBER_SAFETY = StaticChannelRoute.MEMBER_SAFETY; if (channelId === MEMBER_SAFETY) { return ( )((require(1305) /* metro dependency 1305: native */).Icon)} /> ); } if (value7) { return ( )(importDefault(5475) /* metro dependency 5475: FastImage */)} /> ); } if (threadDraft == null) { moduleValue6 = require(8581) /* metro dependency 8581: AgeGateUtils */; if (moduleValue6.shouldNSFWGateGuild(guildId)) { return ( ); } if (value4 == null) { return ( ); } moduleValue7 = require(4805) /* metro dependency 4805: useChannelName */; channelName = moduleValue7.computeChannelName(value4, UserStore, RelationshipStore); channelIconWithGuild = (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIconWithGuild(value4, guild); if (value4.isDM()) { recipientId = value4.getRecipientId(); return ( } icon={channelIconWithGuild} titleSuffix={value4.isSystemDM() ? null : } subTitle={((Component) => )(importDefault(8829) /* metro dependency 8829: ActivityStatus */)} /> ); } isThread2 = value4.isThread(); formatToPlainString = intl.formatToPlainString; if (isThread2) { return ( } /> ); } return ( ); } if (value4 == null) { r14 = threadDraft.name == null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4WNcpu']) : threadDraft.name.length > 0 ? threadDraft.name : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4WNcpu']); moduleValue9 = require(6647) /* metro dependency 6647: ChannelUtils */; return ( } /> ); } if (value4.isForumLikeChannel()) { moduleValue6 = require(8581) /* metro dependency 8581: AgeGateUtils */; if (moduleValue6.shouldNSFWGateGuild(guildId)) { return ( ); } if (value4 == null) { return ( ); } moduleValue7 = require(4805) /* metro dependency 4805: useChannelName */; channelName = moduleValue7.computeChannelName(value4, UserStore, RelationshipStore); channelIconWithGuild = (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIconWithGuild(value4, guild); if (value4.isDM()) { recipientId = value4.getRecipientId(); return ( } icon={channelIconWithGuild} titleSuffix={value4.isSystemDM() ? null : } subTitle={((Component) => )(importDefault(8829) /* metro dependency 8829: ActivityStatus */)} /> ); } isThread2 = value4.isThread(); formatToPlainString = intl.formatToPlainString; if (isThread2) { return ( } /> ); } return ( ); } r14 = threadDraft.name == null ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4WNcpu']) : threadDraft.name.length > 0 ? threadDraft.name : intl.string((require(1244) /* metro dependency 1244: indexNative */).t['4WNcpu']); moduleValue9 = require(6647) /* metro dependency 6647: ChannelUtils */; const getThreadChannelIcon = moduleValue9.getThreadChannelIcon; return ( } /> ); } function ChannelTitleWrapper({children, onPressTitle, style}) { // fn#92717, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12253:4288, offset: 0x020968f4, size: 174 bytes, params: 2, frame: 20 const styles = useStyles(); if (onPressTitle == null) { return ( {children} ); } else { const PressableOpacity = (require(5278) /* metro dependency 5278: Pressables */).PressableOpacity; return ( {children} ); } } function ChannelTitleContent({title, icon, titleSuffix, subTitle, accessibleTitle}) { // fn#92719, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12253:4565, offset: 0x020969a2, size: 403 bytes, params: 2, frame: 25 const styles = useStyles(); const r5 = icon != null ? env0_3.isValidElement(icon) ? icon : ((Icon) => )((require(1305) /* metro dependency 1305: native */).Icon) : null; const binding = env0_3; return ( {r5} {binding.isValidElement(title) ? title : {((Text) => {title})((require(4573) /* metro dependency 4573: Text */).Text)}} {titleSuffix} {subTitle} ); } function ParentChannelSubTitle_92720({parentChannel}) { // fn#92720, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12253:5214, offset: 0x02096b35, size: 216 bytes, params: 2, frame: 27 const styles = useStyles(); const Text = (require(4573) /* metro dependency 4573: Text */).Text; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const formatToPlainString = intl.formatToPlainString; const BjYvHO = (require(1244) /* metro dependency 1244: indexNative */).t.BjYvHO; const object = {}; object.channelName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(parentChannel, UserStore, RelationshipStore); return ( {(require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(parentChannel, UserStore, RelationshipStore, true)} ); } function DMChannelName({userId, style}) { // fn#92721, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12253:5568, offset: 0x02096c0d, size: 206 bytes, params: 2, frame: 21 const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore, RelationshipStore], _fun92722, [userId]); const LegacyText = (require(1305) /* metro dependency 1305: native */).LegacyText; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; return ( {value2} ); } function ConnectedStatus({style, userId}) { // fn#92723, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12253:5959, offset: 0x02096d3a, size: 178 bytes, params: 2, frame: 21 const {status, isMobileOnline, isVROnline, streaming} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore], _fun92724); const Status = (require(1305) /* metro dependency 1305: native */).Status; const StatusSizes = (require(1305) /* metro dependency 1305: native */).StatusSizes; const SMALL = StatusSizes.SMALL; return ( ); } function ChannelTitleWithoutRoute({onPressTitle, channelId}) { // fn#92725, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12253:6453, offset: 0x02096e58, size: 538 bytes, params: 2, frame: 25 var r13; var moduleValue4; var recipientId; const styles = useStyles(); const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() { return ChannelStore.getChannel(channelId); }); const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GatewayConnectionStore], function() { return GatewayConnectionStore.isConnected(); }); const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const string = intl.string; const t = (require(1244) /* metro dependency 1244: indexNative */).t; let r12 = value2 ? Reflect.apply(string, intl, [t.ai6Lbr]) : Reflect.apply(string, intl, [t.ZTNur7]); const r8 = channel != null ? (require(6647) /* metro dependency 6647: ChannelUtils */).getChannelIcon(channel) : null; if (channel != null) { moduleValue4 = require(4805) /* metro dependency 4805: useChannelName */; r13 = moduleValue4.computeChannelName(channel, UserStore, RelationshipStore); } else { r13 = null; } if (channel != null) { if (channel.isDM()) { recipientId = channel.getRecipientId(); return ( } icon={r8} titleSuffix={channel.isSystemDM() ? null : } subTitle={((Component) => )(importDefault(8829) /* metro dependency 8829: ActivityStatus */)} /> ); } } r12 = r13 ?? r12; return ( ); } function ChannelButtons({buttons, style}) { // fn#92728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12253:7269, offset: 0x02097072, size: 75 bytes, params: 2, frame: 17 return ( {buttons?.map(_fun92729)} ); } function _fun92714() { // fn#92714, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12253:1303, offset: 0x020967ed, size: 66 bytes, params: 1, frame: 14 const channelIdBinding = channelId; const GUILD_HOME = StaticChannelRoute.GUILD_HOME; return channelIdBinding === GUILD_HOME || channelId === StaticChannelRoute.MEMBER_SAFETY ? null : ChannelStore.getChannel(channelId); } function _fun92715() { // fn#92715, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12253:1403, offset: 0x0209682f, size: 52 bytes, params: 1, frame: 13 const value = environment.__proto__; return GuildStore.getGuild(env0_2?.getGuildId()); } function _fun92716() { // fn#92716, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12253:1486, offset: 0x02096863, size: 145 bytes, params: 1, frame: 15 const threadDraftBinding = threadDraft; const value2 = null; return value2 == threadDraftBinding ? value2 != env0_2 && value2 != env0_2.parent_id && THREAD_CHANNEL_TYPES.has(env0_2.type) ? ChannelStore.getChannel(env0_2.parent_id) : value2 : value2 != threadDraft.parentChannelId ? ChannelStore.getChannel(threadDraft.parentChannelId) : value2 != env0_2 && value2 != env0_2.parent_id && THREAD_CHANNEL_TYPES.has(env0_2.type) ? ChannelStore.getChannel(env0_2.parent_id) : value2; } function _fun92722() { // fn#92722, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12253:5632, offset: 0x02096cdb, size: 95 bytes, params: 1, frame: 14 var r1; let value = environment.__proto__; const getNickname = RelationshipStore.getNickname; const userIdBinding = userId; const value3 = Reflect.apply(getNickname, RelationshipStore, [userIdBinding]); if (value3 != null) { r1 = value3; } else { value = importDefault(3995) /* metro dependency 3995: UserUtils */; value = value.getName(UserStore.getUser(userIdBinding)); r1 = value; } return r1 ?? ''; } function _fun92724() { // fn#92724, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12253:6027, offset: 0x02096dec, size: 108 bytes, params: 1, frame: 14 const object2 = {}; let value = environment.__proto__; const getStatus = PresenceStore.getStatus; const userIdBinding = userId; object2.status = Reflect.apply(getStatus, PresenceStore, [userIdBinding]); object2.isMobileOnline = PresenceStore.isMobileOnline(userIdBinding); object2.isVROnline = PresenceStore.isVROnline(userIdBinding); value = importDefault(8419) /* metro dependency 8419: isStreaming */; const getActivities = PresenceStore.getActivities; object2.streaming = value(Reflect.apply(getActivities, PresenceStore, [userIdBinding])); return object2; } function _fun92729({onPress, onLongPress, source, color, style, accessibilityLabel, children, disabled, hasActivitiesPrivateChannelTooltip}, a1) { // fn#92729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12253:7336, offset: 0x020970bd, size: 288 bytes, params: 3, frame: 29 var environment; const value = environment.__proto__; return ( {((Component) => {children})(importDefault(8792) /* metro dependency 8792: TouchableHitBox */)} {hasActivitiesPrivateChannelTooltip ? ((Component) => {children_92731})(importDefault(10357) /* metro dependency 10357: SelectedDismissibleContent */) : null} ); } function children_92731({visibleContent, markAsDismissed}) { // fn#92731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12253:7909, offset: 0x02097248, size: 110 bytes, params: 2, frame: 16 var environment; var r0; let value = environment.__proto__.__proto__; const DismissibleContent = (require(1365) /* metro dependency 1365: dismissible_content */).DismissibleContent; const ACTIVITY_GDM_CALL_TOOLTIP = DismissibleContent.ACTIVITY_GDM_CALL_TOOLTIP; if (visibleContent !== ACTIVITY_GDM_CALL_TOOLTIP) { r0 = null; } else { value = importDefault(12071) /* metro dependency 12071: ActivitiesPrivateChannelCallTooltip */; value = ((Component) => )(value); r0 = value; } return r0; }