Files
discord-decomp/sources/modules/user_profile/native/NonUserBotProfileContent.tsx
T
2026-07-28 01:06:53 +03:00

120 lines
8.5 KiB
TypeScript

/* Metro module 8759; source: modules/user_profile/native/NonUserBotProfileContent.tsx; dependencies: [31, 27, 6816, 6276, 33, 8496, 8514, 4617, 3995, 8501, 8752, 8760, 1585, 8494, 8497, 6797, 3856, 8761, 4017, 8510, 8695, 1244, 8762, 2] */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UserUtils from '../../../utils/UserUtils.tsx'; /* Metro dependency 3995 */
import ReanimatedRexport from '../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
import NicknameUtils from '../../../utils/NicknameUtils.tsx'; /* Metro dependency 4617 */
import UseProfileTheme from '../hooks/useProfileTheme.tsx'; /* Metro dependency 8494 */
import UserProfileSharedStyles from './UserProfileSharedStyles.tsx'; /* Metro dependency 8496 */
import UseBadges from '../hooks/useBadges.tsx'; /* Metro dependency 8501 */
import UserProfilePrimaryInfo from './UserProfilePrimaryInfo.tsx'; /* Metro dependency 8695 */
import UseUserProfileBannerHeight from '../hooks/native/useUserProfileBannerHeight.tsx'; /* Metro dependency 8752 */
import UseUserProfileOverscrollStyles from './useUserProfileOverscrollStyles.tsx'; /* Metro dependency 8760 */
import UserProfileOverscrollBanner from './UserProfileOverscrollBanner.tsx'; /* Metro dependency 8761 */
import UserProfileAboutMeCard from './UserProfileAboutMeCard.tsx'; /* Metro dependency 8762 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as ToastUtilsModule from '../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */
import * as ActionSheetConstantsModule from '../../action_sheet/native/ActionSheetConstants.tsx'; /* Metro dependency 6276 */
import * as ClipboardUtilsNativeModule from '../../../utils/ClipboardUtils.native.tsx'; /* Metro dependency 6797 */
import * as ConstantsModule from './Constants.tsx'; /* Metro dependency 6816 */
import * as UseUserProfileColorsModule from '../hooks/native/useUserProfileColors.tsx'; /* Metro dependency 8497 */
import * as UserProfileAnalyticsContextModule from '../UserProfileAnalyticsContext.tsx'; /* Metro dependency 8514 */
function _fun68545(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8944:6, offset: 0x01c52f0c, size: 242 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactModule;
value = value.memo(NonUserBotProfileContent);
(FileImportTrackerModule).fileFinishedImporting('modules/user_profile/native/NonUserBotProfileContent.tsx');
exports.default = value;
function NonUserBotProfileContent({user, channel, displayProfile, scrollPosition}) { // fn#68546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8944:300, offset: 0x01c52ffe, size: 1017 bytes, params: 2, frame: 40
const value3 = (UserProfileSharedStyles)();
const useUserProfileAnalyticsContext = UserProfileAnalyticsContextModule.useUserProfileAnalyticsContext;
const env0_0 = Reflect.apply(useUserProfileAnalyticsContext, UserProfileAnalyticsContextModule,
[]).trackUserProfileAction;
const defaultImport = NicknameUtils;
const useName = defaultImport.useName;
let guild_id = channel?.guild_id;
const value4 = Reflect.apply(useName, defaultImport, [guild_id, channel?.id, user]);
const env0_1 = (UserUtils).useUserTag(user);
const value5 = (UseBadges)(displayProfile);
const value6 = (UseUserProfileBannerHeight)(ACTION_SHEET_MAX_WIDTH);
const {bannerAnimatedStyle, bannerImageAnimatedStyle, contentAnimatedStyle, blurAnimatedProps,
showBlur} = (UseUserProfileOverscrollStyles)({scrollPosition: scrollPosition,
bannerHeight: value6});
const bottom = (UseSafeAreaInsetsNative)().bottom;
const {theme, primaryColor,
secondaryColor} = (UseProfileTheme)({user: user,
displayProfile: displayProfile});
const {avatarBackground,
containerBackground} = (UseUserProfileColorsModule).useUserProfileColors({theme: theme,
primaryColor: primaryColor, secondaryColor: secondaryColor});
if (user == null) {
return null;
}
const onPressDisplayName2 = onPressDisplayName;
const jsxRuntimeEnv0_9Binding = jsxRuntimeEnv0_9;
const value10 = ((Component) => <Component user={user} displayProfile={displayProfile} bannerHeight={value6} bannerAnimatedStyle={bannerAnimatedStyle} bannerImageAnimatedStyle={bannerImageAnimatedStyle} blurAnimatedProps={blurAnimatedProps} showBlur={showBlur} />)(UserProfileOverscrollBanner);
const View2 = (ReanimatedRexport).View;
const value11 = ((Component) => <Component user={user} guildId={displayProfile?.guildId ?? undefined} backgroundColor={avatarBackground} disableStatus />)(importDefault(8510) /* metro dependency 8510: UserProfileAvatar */);
const items3 = [value3.profileContentWrapper];
items3[1] = value3.profileContent;
items3[2] = {paddingTop: PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING,
paddingBottom: bottom + PROFILE_CONTENT_BOTTOM_PADDING};
const primaryInfo = value3.primaryInfo;
guild_id = channel?.guild_id;
const pronouns = displayProfile?.pronouns;
const intl = (IndexNativeModule).intl;
return (
<>
{value10}
<View2 style={contentAnimatedStyle}>
{value11}
<View style={items3}>
<View style={primaryInfo}>
<UserProfilePrimaryInfo
user={user}
guildId={guild_id}
displayName={value4}
pronouns={pronouns}
badges={value5}
badgeContainerBackground={containerBackground}
displayNameAccessibilityHint={intl.string((IndexNativeModule).t.y5MwJy)}
onPressDisplayName={onPressDisplayName2}
onPressUserTag={onPressDisplayName2}
onPressPronouns={onPressPronouns}
showBadgeToastOnPress
/>
</View>
<View style={value3.cards}>
{((Component) => <Component userId={user.id} displayProfile={displayProfile} channel={channel} style={[value3.card,
{backgroundColor: containerBackground}]} />)(UserProfileAboutMeCard)}
</View>
</View>
</View2>
</>
);
function onPressDisplayName() { // fn#68547, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8944:1019, owner: NonUserBotProfileContent.onPressDisplayName, offset: 0x01c533f7, size: 88 bytes, params: 1, frame: 14
trackUserProfileAction({action: 'COPY_USERNAME'});
(ClipboardUtilsNativeModule).copy(env0_1);
(ToastUtilsModule).presentUsernameCopied();
}
function onPressPronouns() { // fn#68548, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8944:1827, owner: NonUserBotProfileContent.onPressPronouns, offset: 0x01c5344f, size: 61 bytes, params: 1, frame: 12
trackUserProfileAction({action: 'PRESS_PRONOUNS'});
const value = environment.__proto__;
(ToastUtilsModule).presentUserPronouns();
}
}
}
global.__d(_fun68545, 8759, [31, 27, 6816, 6276, 33, 8496, 8514, 4617, 3995, 8501, 8752, 8760, 1585, 8494, 8497,
6797, 3856, 8761, 4017, 8510, 8695, 1244, 8762,
2]) /* metro module 8759, dependencies: [31, 27, 6816, 6276, 33, 8496, 8514, 4617, 3995, 8501, 8752, 8760, 1585, 8494, 8497, 6797, 3856, 8761, 4017, 8510, 8695, 1244, 8762, 2] */;