/* 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] */ import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */ import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */ import LocaleStore from '../../user_settings/LocaleStore.tsx'; /* Metro dependency 1949 */ import PresenceStore from '../../../stores/PresenceStore.tsx'; /* Metro dependency 4396 */ import AccessibilityStore from '../../a11y/AccessibilityStore.tsx'; /* Metro dependency 4502 */ import ChannelActionCreators from '../../../actions/ChannelActionCreators.tsx'; /* Metro dependency 4603 */ import UserGuildSettingsStore from '../../../stores/UserGuildSettingsStore.tsx'; /* Metro dependency 4864 */ import TypingStore from '../../../stores/TypingStore.tsx'; /* Metro dependency 11532 */ import GetLayoutStyles from './shared/getLayoutStyles.tsx'; /* Metro dependency 15332 */ import RenderChannelPressableWrapper from './shared/renderChannelPressableWrapper.tsx'; /* Metro dependency 15333 */ import RenderChannelWrapper from './shared/renderChannelWrapper.tsx'; /* Metro dependency 15334 */ import UnreadBadge from './shared/UnreadBadge.tsx'; /* Metro dependency 15336 */ import RenderChannelContent from './shared/renderChannelContent.tsx'; /* Metro dependency 15337 */ import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ 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 ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */ import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */ import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */ import * as UseFontScaleModule from '../../screen/native/useFontScale.tsx'; /* Metro dependency 4584 */ import * as ReadStateConstantsModule from '../../read_states/ReadStateConstants.tsx'; /* Metro dependency 4865 */ import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */ import * as UseChannelUnreadBadgeStateModule from './shared/useChannelUnreadBadgeState.tsx'; /* Metro dependency 14436 */ 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 = ReactModule; const createStyles = CreateStylesModule.createStyles; const INTERACTIVE_BACKGROUND_ACTIVE = (Native).colors.INTERACTIVE_BACKGROUND_ACTIVE; const env0_15 = Reflect.apply(createStyles, CreateStylesModule, [{pressable: {flex: 1}, pressableUnderlayColor: {backgroundColor: INTERACTIVE_BACKGROUND_ACTIVE}}]); value = value.memo(_fun117341); (FileImportTrackerModule).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 = (GetLayoutStyles)(); const value8 = env0_3.useCallback(_fun117334, [user.id]); const value9 = (UseFontScaleModule).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 presenceStoreBinding = PresenceStore; var userBinding = user; object.isMobileOnline = presenceStoreBinding.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 = RenderChannelPressableWrapper; const PressableHighlight = (PressablesModule).PressableHighlight; const backgroundColor = styles.pressableUnderlayColor.backgroundColor; const items3 = [styles.pressable]; items3[1] = {borderRadius: value7.container.borderRadius}; const defaultImport3 = RenderChannelWrapper; const jsxRuntimeEnv0_13Binding = jsxRuntimeEnv0_13; let ALL_MESSAGES = UnreadSetting.ALL_MESSAGES; const items2 = [ , ]; const Avatar = (NativeModule).Avatar; items2[1] = ( ); const defaultImport5 = RenderChannelContent; const object2 = {}; object2.name = comparator ?? (importDefault(3995) /* metro dependency 3995: UserUtils */).getUserTag(user); object2.subtitle = ( lastMessage != null && channel != null ? ((ChannelRowPreview) => )((require(10975) /* metro dependency 10975: ChannelRowPreview */).ChannelRowPreview) : undefined ); object2.unread = unread; ALL_MESSAGES = UnreadSetting.ALL_MESSAGES; object2.resolvedUnreadSetting = ALL_MESSAGES; object2.muted = muted; object2.lastMessageTimestampString = r14; object2.mentionCount = mentionCount; object2.mentionBadge = (importDefault(15339) /* metro dependency 15339: renderChannelBadge */)({mentionCount: mentionCount, locale: locale}); items2[2] = defaultImport5(object2); return defaultImport2({defaultImport3(<>{items2}, {fontScale: value9})}); 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__; (ChannelActionCreators).openPrivateChannel({recipientIds: [user.id]}); } } 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} = (UseChannelUnreadBadgeStateModule).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 useStateFromStores = FluxModule.useStateFromStores; const channelStoreBinding = ChannelStore; const env0_1 = Reflect.apply(useStateFromStores, FluxModule, [[channelStoreBinding], function() { return ChannelStore.getDMFromUserId(user.id); }]); const channel = FluxModule.useStateFromStores([channelStoreBinding], function() { return ChannelStore.getChannel(dMFromUserId); }); return ( channel != null ? ( ) : ( ) ); } } global.__d(_fun117332, 15349, [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]) /* metro module 15349, 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] */;