/* Metro module 15349; source: modules/launchpad/native/LaunchPadSearchResultUser.tsx; dependencies: [31, 4502, 1949, 1379, 4396, 11532, 4864, 661, 4865, 33, 4501, 697, 15332, 4603, 4584, 566, 21, 4788, 15333, 5278, 15334, 15336, 1305, 8419, 15337, 3995, 10975, 3834, 15339, 14436, 13775, 2] */ function _fun117332(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117332, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15546:6, offset: 0x024af32d, size: 406 bytes, params: 8, frame: 22 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = importAll(31) /* metro dependency 31 */; const accessibilityStore = importDefault(4502) /* metro dependency 4502: AccessibilityStore */; const localeStore = importDefault(1949) /* metro dependency 1949: LocaleStore */; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */; const typingStore = importDefault(11532) /* metro dependency 11532: TypingStore */; const userGuildSettingsStore = importDefault(4864) /* metro dependency 4864: UserGuildSettingsStore */; const env0_10 = (require(661) /* metro dependency 661: Constants */).StatusTypes; const env0_11 = (require(4865) /* metro dependency 4865: ReadStateConstants */).UnreadSetting; const value2 = require(33) /* metro dependency 33 */; const env0_12 = value2.jsx; const env0_13 = value2.Fragment; const env0_14 = value2.jsxs; const createStylesModule = require(4501) /* metro dependency 4501: createStyles */; const createStyles = createStylesModule.createStyles; const INTERACTIVE_BACKGROUND_ACTIVE = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_BACKGROUND_ACTIVE; const env0_15 = Reflect.apply(createStyles, createStylesModule, [{pressable: {flex: 1}, pressableUnderlayColor: {backgroundColor: INTERACTIVE_BACKGROUND_ACTIVE}}]); value = value.memo(_fun117341); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/launchpad/native/LaunchPadSearchResultUser.tsx'); exports.default = value; } function UserResult({user, comparator, channel, lastMessage, unread, mentionCount, muted, isTyping}) { // fn#117333, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15546:385, offset: 0x024af4c3, size: 1093 bytes, params: 2, frame: 44 var r3; var defaultImport; unread = !(unread === undefined) && unread; mentionCount = mentionCount === undefined ? 0 : mentionCount; muted = !(muted === undefined) && muted; isTyping = !(isTyping === undefined) && isTyping; const styles = useStyles(); const value7 = (importDefault(15332) /* metro dependency 15332: getLayoutStyles */)(); const value8 = env0_3.useCallback(_fun117334, [user.id]); const value9 = (require(4584) /* metro dependency 4584: useFontScale */).useFontScale(); const locale = (require(566) /* metro dependency 566: flux */).useStateFromStores([LocaleStore], function() { return LocaleStore.locale; }); const useReducedMotion = (require(566) /* metro dependency 566: flux */).useStateFromStores([AccessibilityStore], function() { return AccessibilityStore.useReducedMotion; }); const {isMobileOnline, isVROnline, status, activities} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([PresenceStore], function() { var object = {}; var userBinding = user; object.isMobileOnline = PresenceStore.isMobileOnline(userBinding.id); object.isVROnline = PresenceStore.isVROnline(userBinding.id); object.status = PresenceStore.getStatus(userBinding.id); object.activities = PresenceStore.getActivities(userBinding.id); return object; }); if (lastMessage != null) { defaultImport = importDefault(21) /* metro dependency 21: SnowflakeUtils */; r3 = defaultImport.extractTimestamp(lastMessage.id); } else { r3 = undefined; } const r14 = r3 != null ? (require(4788) /* metro dependency 4788: NotificationCenterUtils */).getRelativeTimestamp(r3) : null; const value14 = 'text-muted'; const r23 = unread ? muted ? value14 : 'text-default' : value14; const defaultImport2 = importDefault(15333) /* metro dependency 15333: renderChannelPressableWrapper */; const PressableHighlight = (require(5278) /* metro dependency 5278: Pressables */).PressableHighlight; const backgroundColor = styles.pressableUnderlayColor.backgroundColor; const items3 = [styles.pressable]; items3[1] = {borderRadius: value7.container.borderRadius}; const defaultImport3 = importDefault(15334) /* metro dependency 15334: renderChannelWrapper */; const jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13; const UnreadBadge = importDefault(15336) /* metro dependency 15336: UnreadBadge */; let ALL_MESSAGES = UnreadSetting.ALL_MESSAGES; const items2 = []; const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar; items2[1] = ; const defaultImport5 = importDefault(15337) /* metro dependency 15337: renderChannelContent */; let object = {}; object.name = comparator ?? (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(user); object.subtitle = lastMessage != null && channel != null ? ((ChannelRowPreview) => )((require(10975) /* metro dependency 10975: ChannelRowPreview */).ChannelRowPreview) : undefined; object.unread = unread; ALL_MESSAGES = UnreadSetting.ALL_MESSAGES; object.resolvedUnreadSetting = ALL_MESSAGES; object.muted = muted; object.lastMessageTimestampString = r14; object.mentionCount = mentionCount; object.mentionBadge = (importDefault(15339) /* metro dependency 15339: renderChannelBadge */)({mentionCount: mentionCount, locale: locale}); items2[2] = defaultImport5(object); return defaultImport2({defaultImport3(<>{items2}, {fontScale: value9})}); } function UserResultWithChannel(a0) { // fn#117338, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15546:1981, offset: 0x024af9ba, size: 266 bytes, params: 2, frame: 22 const env0_0 = a0.user; const channel = a0.channel; const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserGuildSettingsStore], function() { return UserGuildSettingsStore.isChannelMuted(undefined, channel.id); }); const {unread, mentionCount} = (require(14436) /* metro dependency 14436: useChannelUnreadBadgeState */).useBaseChannelUnreadBadgeState(channel, value2); return ( ); } function _fun117341(a0) { // fn#117341, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15546:2383, offset: 0x024afb11, size: 179 bytes, params: 2, frame: 21 const env0_0 = a0.user; const env0_1 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() { return ChannelStore.getDMFromUserId(user.id); }); const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() { return ChannelStore.getChannel(dMFromUserId); }); return channel != null ? : ; } function _fun117334() { // fn#117334, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15546:546, offset: 0x024af908, size: 65 bytes, params: 1, frame: 14 const value = environment.__proto__; (importDefault(4603) /* metro dependency 4603: ChannelActionCreators */).openPrivateChannel({recipientIds: [user.id]}); }