2026-09-18 06:58:00 +00:00
// Module ID: 17369
// Function ID: 17370
2026-09-10 05:38:07 +00:00
// Name: LaunchPadSearchResultUser
2026-09-18 06:58:00 +00:00
// Dependencies: [19, 4714, 2026, 1958, 4762, 12207, 4903, 1074, 4904, 21, 4722, 576, 17046, 4735, 5151, 504, 11, 7837, 17358, 5292, 17047, 17359, 1177, 8489, 17049, 4566, 10352, 8084, 17360, 16601, 15528, 2]
2026-07-20 16:05:17 +00:00
2026-09-18 06:58:00 +00:00
// Module 17369 (LaunchPadSearchResultUser)
2026-09-05 10:56:28 +00:00
import initialize from "initialize" /* 504 */ ;
2026-09-10 05:38:07 +00:00
import nativeDefault from "native" /* 576 */ ;
2026-09-18 06:58:00 +00:00
import ChannelActionCreatorsDefault from "ChannelActionCreators" /* 4735 */ ;
import isStreamingDefault from "isStreaming" /* 8489 */ ;
import useChannelUnreadBadgeState from "useChannelUnreadBadgeState" /* 16601 */ ;
import getLayoutStylesDefault from "getLayoutStyles" /* 17046 */ ;
import renderChannelWrapperDefault from "renderChannelWrapper" /* 17047 */ ;
import renderChannelContentDefault from "renderChannelContent" /* 17049 */ ;
import renderChannelPressableWrapperDefault from "renderChannelPressableWrapper" /* 17358 */ ;
import UnreadBadgeDefault from "UnreadBadge" /* 17359 */ ;
import shared_renderChannelBadgeDefault from "shared/renderChannelBadge" /* 17360 */ ;
2026-09-10 05:38:07 +00:00
import noop from "module_19" /* 19 */ ;
2026-09-18 06:58:00 +00:00
import AccessibilityStore from "AccessibilityStore" /* 4714 */ ;
2026-09-15 14:23:42 +00:00
import LocaleStore from "LocaleStore" /* 2026 */ ;
import ChannelStore from "ChannelStore" /* 1958 */ ;
2026-09-18 06:58:00 +00:00
import PresenceStore from "PresenceStore" /* 4762 */ ;
import TypingStore from "TypingStore" /* 12207 */ ;
import UserGuildSettingsStore from "UserGuildSettingsStore" /* 4903 */ ;
2026-07-23 10:11:24 +00:00
2026-09-10 05:38:07 +00:00
require = fn ;
2026-07-20 16:05:17 +00:00
function UserResult ( user ) {
user = user . user ;
( { comparator , channel , lastMessage , unread } = user ) ;
if ( unread === undefined ) {
unread = false ;
}
let num = user . mentionCount ;
if ( num === undefined ) {
num = 0 ;
}
let flag = user . muted ;
if ( flag === undefined ) {
flag = false ;
}
let flag2 = user . isTyping ;
if ( flag2 === undefined ) {
flag2 = false ;
}
2026-09-10 05:38:07 +00:00
const tmp = closure_15 ( ) ;
const tmp4 = getLayoutStylesDefault ( ) ;
2026-07-23 10:11:24 +00:00
let items = [ user . id ] ;
2026-09-10 05:38:07 +00:00
const callback = noop . useCallback ( ( ) = > {
const obj2 = { recipientIds : null } ;
2026-07-20 16:05:17 +00:00
const items = [ user . id ] ;
2026-09-10 05:38:07 +00:00
obj2 . recipientIds = items ;
ChannelActionCreatorsDefault . openPrivateChannel ( obj2 ) ;
2026-07-20 16:05:17 +00:00
} , items ) ;
2026-09-18 06:58:00 +00:00
const fontScale = user ( 5151 ) . useFontScale ( ) ;
const obj = user ( 5151 ) ;
2026-09-10 05:38:07 +00:00
const items1 = [ LocaleStore ] ;
const stateFromStores = user ( 504 ) . useStateFromStores ( items1 , ( ) = > locale . locale ) ;
2026-09-05 10:56:28 +00:00
let obj2 = user ( 504 ) ;
2026-09-10 05:38:07 +00:00
const items2 = [ AccessibilityStore ] ;
const stateFromStores1 = user ( 504 ) . useStateFromStores ( items2 , ( ) = > useReducedMotion . useReducedMotion ) ;
const obj3 = user ( 504 ) ;
const items3 = [ PresenceStore ] ;
const stateFromStoresObject = user ( 504 ) . useStateFromStoresObject ( items3 , ( ) = > ( { isMobileOnline : PresenceStore.isMobileOnline ( user . id ) , isVROnline : PresenceStore.isVROnline ( user . id ) , status : PresenceStore.getStatus ( user . id ) , activities : PresenceStore.getActivities ( user . id ) } ) ) ;
2026-07-20 16:05:17 +00:00
const status = stateFromStoresObject . status ;
let extractTimestampResult ;
( { isMobileOnline , isVROnline , activities } = stateFromStoresObject ) ;
if ( null != lastMessage ) {
2026-09-10 05:38:07 +00:00
extractTimestampResult = tmp2 ( 11 ) . extractTimestamp ( lastMessage . id ) ;
const tmp2Result = tmp2 ( 11 ) ;
2026-07-20 16:05:17 +00:00
}
let relativeTimestamp = null ;
if ( null != extractTimestampResult ) {
2026-09-18 06:58:00 +00:00
relativeTimestamp = tmp6 ( 7837 ) . getRelativeTimestamp ( extractTimestampResult ) ;
const tmp6Result = tmp6 ( 7837 ) ;
2026-07-20 16:05:17 +00:00
}
let str = "text-muted" ;
if ( unread ) {
str = "text-muted" ;
if ( ! flag ) {
str = "text-default" ;
}
}
2026-09-10 05:38:07 +00:00
const obj4 = user ( 504 ) ;
const obj5 = { onPress : callback , underlayColor : tmp.pressableUnderlayColor.backgroundColor , style : null , children : null } ;
const items4 = [ tmp . pressable , { borderRadius : tmp4.container.borderRadius } ] ;
obj5 . style = items4 ;
const tmp2Result5 = renderChannelPressableWrapperDefault ;
const items5 = [ closure_12 ( UnreadBadgeDefault , { unread , resolvedUnreadSetting : UnreadSetting.ALL_MESSAGES } ) , , ] ;
2026-09-18 06:58:00 +00:00
const obj7 = { user , guildId : "e" , isMobileOnline , isVROnline , status : null , streaming : "6a336799c634b8d004d29afaef8bc9a8" , style : "fr.messages.6a336799c634b8d004d29afaef8bc9a8.compiled.messages" , size : "jsona" , animate : "alivio" , typing : "belleza" , autoStatusCutout : "dolor de cabeza" } ;
2026-07-29 08:29:29 +00:00
let tmp19 = null ;
2026-07-20 16:05:17 +00:00
if ( ! user . isSystemUser ( ) ) {
2026-07-29 08:29:29 +00:00
tmp19 = null ;
2026-07-20 16:05:17 +00:00
if ( status !== StatusTypes . OFFLINE ) {
2026-07-29 08:29:29 +00:00
tmp19 = status ;
2026-07-20 16:05:17 +00:00
}
}
2026-09-10 05:38:07 +00:00
obj7 . status = tmp19 ;
obj7 . streaming = isStreamingDefault ( activities ) ;
obj7 . style = tmp4 . icon . margin ;
obj7 . size = tmp4 . icon . avatarSize ;
2026-07-29 08:29:29 +00:00
let tmp21 = ! stateFromStores1 ;
if ( ! stateFromStores1 ) {
let tmp22 = flag2 ;
2026-07-20 16:05:17 +00:00
if ( ! flag2 ) {
2026-07-29 08:29:29 +00:00
tmp22 = unread ;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp21 = tmp22 ;
2026-07-20 16:05:17 +00:00
}
2026-09-10 05:38:07 +00:00
obj7 . animate = tmp21 ;
obj7 . typing = flag2 ;
2026-09-15 14:23:42 +00:00
items5 [ 1 ] = closure_12 ( user ( 1177 ) . Avatar , obj7 ) ;
2026-09-10 05:38:07 +00:00
const obj6 = { unread , resolvedUnreadSetting : UnreadSetting.ALL_MESSAGES } ;
2026-07-29 08:29:29 +00:00
const tmp16 = closure_14 ;
const tmp17 = closure_13 ;
const tmp18 = UnreadSetting ;
2026-09-10 05:38:07 +00:00
const tmp2Result6 = renderChannelWrapperDefault ;
2026-07-29 08:29:29 +00:00
if ( comparator == null ) {
2026-09-18 06:58:00 +00:00
comparator = tmp2 ( 4566 ) . getUserTag ( user ) ;
const tmp2Result8 = tmp2 ( 4566 ) ;
2026-07-20 16:05:17 +00:00
}
2026-09-10 05:38:07 +00:00
const obj8 = { name : comparator , subtitle : null , unread : null , resolvedUnreadSetting : null , muted : null , lastMessageTimestampString : null , mentionCount : null , mentionBadge : null } ;
2026-07-29 08:29:29 +00:00
let tmp14Result ;
2026-07-20 16:05:17 +00:00
if ( null != lastMessage ) {
if ( null != channel ) {
2026-09-18 06:58:00 +00:00
const obj9 = { channel , message : lastMessage , color : str , muted : flag , layout : tmp6 ( 8084 ) . ChannelListLayoutTypes . COMPACT } ;
tmp14Result = tmp14 ( tmp6 ( 10352 ) . ChannelRowPreview , obj9 ) ;
2026-07-20 16:05:17 +00:00
}
}
2026-09-10 05:38:07 +00:00
const obj10 = { children : null } ;
obj8 . subtitle = tmp14Result ;
obj8 . unread = unread ;
obj8 . resolvedUnreadSetting = tmp18 . ALL_MESSAGES ;
obj8 . muted = flag ;
obj8 . lastMessageTimestampString = relativeTimestamp ;
obj8 . mentionCount = num ;
obj8 . mentionBadge = shared_renderChannelBadgeDefault ( { mentionCount : num , locale : stateFromStores } ) ;
items5 [ 2 ] = renderChannelContentDefault ( obj8 ) ;
obj10 . children = items5 ;
obj5 . children = tmp2Result6 ( tmp16 ( tmp17 , obj10 ) , { fontScale } ) ;
2026-09-18 06:58:00 +00:00
return tmp2Result5 ( closure_12 ( user ( 5292 ) . PressableHighlight , obj5 ) ) ;
2026-07-20 16:05:17 +00:00
}
function UserResultWithChannel ( arg0 ) {
2026-07-23 10:11:24 +00:00
( { user : require , channel } = arg0 ) ;
2026-09-10 05:38:07 +00:00
const items = [ UserGuildSettingsStore ] ;
const stateFromStores = initialize . useStateFromStores ( items , ( ) = > UserGuildSettingsStore . isChannelMuted ( undefined , channel . id ) ) ;
2026-08-24 06:08:38 +00:00
const baseChannelUnreadBadgeState = useChannelUnreadBadgeState . useBaseChannelUnreadBadgeState ( channel , stateFromStores ) ;
2026-07-20 16:05:17 +00:00
( { unread , mentionCount } = baseChannelUnreadBadgeState ) ;
2026-09-10 05:38:07 +00:00
const items1 = [ TypingStore ] ;
const stateFromStores1 = initialize . useStateFromStores ( items1 , ( ) = > TypingStore . isTyping ( channel . id , id . id ) ) ;
const obj4 = { } ;
2026-07-20 16:05:17 +00:00
const merged = Object . assign ( arg0 ) ;
2026-09-10 05:38:07 +00:00
obj4 . channel = channel ;
2026-09-18 06:58:00 +00:00
obj4 . lastMessage = channel ( 15528 ) ( channel , { unread } ) ;
2026-09-10 05:38:07 +00:00
obj4 . unread = unread ;
obj4 . mentionCount = mentionCount ;
obj4 . muted = stateFromStores ;
obj4 . isTyping = stateFromStores1 ;
return closure_12 ( UserResult , obj4 ) ;
2026-07-20 16:05:17 +00:00
}
2026-09-10 05:38:07 +00:00
const StatusTypes = fn ( 1074 ) . StatusTypes ;
2026-09-18 06:58:00 +00:00
const UnreadSetting = fn ( 4904 ) . UnreadSetting ;
2026-09-10 05:38:07 +00:00
const jsxProd = fn ( 21 ) ;
2026-07-29 08:29:29 +00:00
( { jsx : closure_12 , Fragment : map1 , jsxs : closure_14 } = jsxProd ) ;
2026-09-18 06:58:00 +00:00
const createStyles = fn ( 4722 ) ;
2026-09-10 05:38:07 +00:00
let obj = { pressable : { flex : 1 } , pressableUnderlayColor : { backgroundColor : nativeDefault.colors.INTERACTIVE_BACKGROUND_ACTIVE } } ;
let closure_15 = createStyles . createStyles ( obj ) ;
let obj3 = { backgroundColor : nativeDefault.colors.INTERACTIVE_BACKGROUND_ACTIVE } ;
const size = fn ( 2 ) ;
const result = size . fileFinishedImporting ( "modules/launchpad/native/LaunchPadSearchResultUser.tsx" ) ;
export default noop . memo ( ( user ) = > {
2026-07-23 10:11:24 +00:00
user = user . user ;
2026-09-10 05:38:07 +00:00
const items = [ ChannelStore ] ;
closure_1 = user ( 504 ) . useStateFromStores ( items , ( ) = > ChannelStore . getDMFromUserId ( user . id ) ) ;
const obj = user ( 504 ) ;
const items1 = [ ChannelStore ] ;
const stateFromStores = user ( 504 ) . useStateFromStores ( items1 , ( ) = > ChannelStore . getChannel ( closure_1 ) ) ;
2026-07-20 16:05:17 +00:00
if ( null != stateFromStores ) {
2026-09-10 05:38:07 +00:00
const obj3 = { } ;
2026-07-20 16:05:17 +00:00
const merged = Object . assign ( user ) ;
2026-09-10 05:38:07 +00:00
obj3 . channel = stateFromStores ;
let tmp7 = closure_12 ( UserResultWithChannel , obj3 ) ;
2026-07-20 16:05:17 +00:00
} else {
2026-09-10 05:38:07 +00:00
const obj4 = { } ;
2026-07-20 16:05:17 +00:00
const merged1 = Object . assign ( user ) ;
2026-09-10 05:38:07 +00:00
tmp7 = closure_12 ( UserResult , obj4 ) ;
2026-07-20 16:05:17 +00:00
}
return tmp7 ;
} ) ;