// Metro module 11963 (f11964). import { memo, useMemo } from "react"; import { View } from "react-native"; import UserStore from "../../../stores/UserStore"; import { PROFILE_CONTENT_BOTTOM_PADDING, PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING } from "./Constants"; import { ACTION_SHEET_MAX_WIDTH } from "../../action_sheet/native/ActionSheetConstants"; import UserProfileSharedStyles from "./UserProfileSharedStyles"; import useUserProfileBannerHeight from "../hooks/native/useUserProfileBannerHeight"; import useUserProfileOverscrollStyles from "./useUserProfileOverscrollStyles"; import useSafeAreaInsets_native from "../../safe_area/useSafeAreaInsets.native"; import { useUserProfileAnalyticsContext } from "../UserProfileAnalyticsContext"; import { useStateFromStores } from "../../../_bundle/Module589"; import NicknameUtils from "../../../utils/NicknameUtils"; import UserUtils from "../../../utils/UserUtils"; import { useSubscribeGuildMembers } from "../../../lib/guild/subscribeGuildMembers"; import useBadges from "../hooks/useBadges"; import useCustomStatusActivityForUser from "../../custom_status/utils/useCustomStatusActivityForUser"; import useProfileTheme from "../hooks/useProfileTheme"; import { useUserProfileColors } from "../hooks/native/useUserProfileColors"; import { copy } from "../../../utils/ClipboardUtils.native"; import { presentUsernameCopied, presentUserPronouns } from "../../toast/native/ToastUtils"; import UserProfileOverscrollBanner from "./UserProfileOverscrollBanner"; import ReanimatedRexport from "../../reanimated/ReanimatedRexport"; import BotUserProfileOverflowMenu from "./BotUserProfileOverflowMenu"; import { OpenableUserProfileAvatar } from "./UserProfileAvatar"; import UserProfileCustomStatusBubble from "./UserProfileCustomStatusBubble"; import ActionSheetActionCreators from "../../action_sheet/native/ActionSheetActionCreators"; import UserProfilePrimaryInfo from "./UserProfilePrimaryInfo"; import { intl, t } from "../../../intl/index.native"; import UserProfileMutualGuilds from "./UserProfileMutualGuilds"; import UserProfileTextButtonGroup from "./UserProfileTextButtonGroup"; import { canInstallApplication } from "../../applications/utils/ApplicationInstallUtils"; import AddOrOpenAppButton from "./AddOrOpenAppButton"; import { Button } from "../../../design/components/Button/native/Button.native"; import { ChatIcon } from "../../../design/components/Icon/native/redesign/generated/ChatIcon"; import Module712 from "../../../_bundle/Module712"; import ModalActionCreators from "../../../actions/ModalActionCreators"; import ChannelActionCreators from "../../../actions/ChannelActionCreators"; import UserProfileActivity from "./UserProfileActivity"; import UserProfileAboutMeCard from "./UserProfileAboutMeCard"; import UserProfileRolesCard from "./UserProfileRolesCard"; import UserProfileModeratorActions from "./UserProfileModeratorActions"; import UserProfileNote from "./UserProfileNote"; const r34 = memo(function BotUserProfileContent(props) { let userTag, guild_id; const { user, channel, displayProfile, showUserProfileActionSheet, disableMessage, scrollPosition } = props; userTag = void 0; guild_id = void 0; const styles = UserProfileSharedStyles(); const userProfileBannerHeight = useUserProfileBannerHeight(ACTION_SHEET_MAX_WIDTH); const styles2 = useUserProfileOverscrollStyles({ scrollPosition, bannerHeight: userProfileBannerHeight }); const { bannerAnimatedStyle, bannerImageAnimatedStyle, contentAnimatedStyle, blurAnimatedProps, showBlur } = styles2; const bottom = useSafeAreaInsets_native().bottom; const trackUserProfileAction = useUserProfileAnalyticsContext().trackUserProfileAction; const stateFromStores = useStateFromStores([UserStore], () => UserStore.getCurrentUser()); const name = NicknameUtils.useName(displayProfile?.guildId, channel?.id, user); userTag = UserUtils.useUserTag(user); const application = displayProfile?.application; guild_id = channel?.guild_id; useSubscribeGuildMembers(useMemo(() => { let r6; if (guild_id != null && user != null) { const r2 = {}; r2[guild_id] = [user.id]; r6 = r2; } else { r6 = {}; } return r6; }, [guild_id, user]), "BotUserProfileContent"); const badges = useBadges(displayProfile); const customStatusActivityForUser = useCustomStatusActivityForUser(user.id); const profileTheme = useProfileTheme({ user, displayProfile }); const { theme, primaryColor } = profileTheme; const userProfileColors = useUserProfileColors({ theme, primaryColor, secondaryColor: profileTheme.secondaryColor }); const { containerBackground, avatarBackground, statusBackground } = userProfileColors; if (user != null && stateFromStores != null) { const r101 = [, , ,]; let guildId = displayProfile?.guildId; if (guildId == null) { guildId = void 0; } const r125 = [, ,]; const style = [styles.profileContentWrapper, styles.profileContent, { paddingTop: customStatusActivityForUser != null ? 0 : PROFILE_CONTENT_WITHOUT_STATUS_TOP_PADDING, paddingBottom: bottom + PROFILE_CONTENT_BOTTOM_PADDING }]; const r144 = [, , ,]; const pronouns = displayProfile?.pronouns; const handleCopyUsername = function handleCopyUsername() { trackUserProfileAction({ action: "COPY_USERNAME" }); copy(userTag); presentUsernameCopied(); }; r144[1] = : void 0 : void 0} secondaryButton={