decord/source/modules/user_profile/native/UserProfileAvatar.tsx

84 lines
2.9 KiB
TypeScript
Raw Normal View History

2026-07-29 08:29:29 +00:00
// Module ID: 8104
// Function ID: 8105
2026-07-20 16:05:17 +00:00
// Name: OpenableUserProfileAvatar
2026-07-29 08:29:29 +00:00
// Dependencies: [19, 17, 8105, 5563, 21, 8079, 7976, 8107, 8114, 1236, 2]
2026-07-20 16:05:17 +00:00
// Exports: OpenableUserProfileAvatar
2026-07-29 08:29:29 +00:00
// Module 8104 (OpenableUserProfileAvatar)
import importAllResult from "noop";
2026-07-23 10:11:24 +00:00
import { View } from "get ActivityIndicator";
import { TrackUserProfileActions } from "USER_PROFILE_TOOLTIP_DELAY";
import { AVATAR_SIZE_VARIANT } from "ARBITRARY_LARGE_OFFSET";
import jsxProd from "jsxProd";
2026-07-29 08:29:29 +00:00
let c9;
let error;
let metroImportAll;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
let c3 = importAllResult;
({ jsx: error, Fragment: metroImportAll, jsxs: c9 } = jsxProd);
2026-07-20 16:05:17 +00:00
const forwardRefResult = importAllResult.forwardRef((backgroundColor, ref) => {
let size = backgroundColor.size;
if (size === undefined) {
size = AVATAR_SIZE_VARIANT;
}
2026-07-29 08:29:29 +00:00
const merged = Object.assign(backgroundColor, Object.create(null));
const tmp2 = importDefault(8079)();
let obj = { children: null };
2026-07-20 16:05:17 +00:00
const items = [, , ];
2026-07-29 08:29:29 +00:00
({ avatarBackground: arr[0], avatarPosition: arr[1] } = tmp2);
2026-07-20 16:05:17 +00:00
items[2] = { backgroundColor: backgroundColor.backgroundColor };
const items1 = [callback(View, { style: items }), ];
2026-07-29 08:29:29 +00:00
obj = { ref, style: items2, size };
2026-07-23 10:11:24 +00:00
items2 = [, ];
2026-07-29 08:29:29 +00:00
({ avatar: arr3[0], avatarPosition: arr3[1] } = tmp2);
2026-07-20 16:05:17 +00:00
const merged1 = Object.assign(merged);
2026-07-29 08:29:29 +00:00
items1[1] = callback(importDefault(7976), obj);
obj[0] = items1;
2026-07-20 16:05:17 +00:00
return callback2(closure_8, obj);
});
2026-07-29 08:29:29 +00:00
let c10 = forwardRefResult;
2026-07-23 10:11:24 +00:00
const result = require("USER_PROFILE_TOOLTIP_DELAY").fileFinishedImporting("modules/user_profile/native/UserProfileAvatar.tsx");
2026-07-20 16:05:17 +00:00
export default forwardRefResult;
export const OpenableUserProfileAvatar = function OpenableUserProfileAvatar(animate) {
let flag = animate.animate;
if (flag === undefined) {
flag = true;
}
const user = animate.user;
const guildId = animate.guildId;
2026-07-29 08:29:29 +00:00
const merged = Object.assign(animate, Object.create(null));
2026-07-23 10:11:24 +00:00
let ref;
let trackUserProfileAction;
2026-07-29 08:29:29 +00:00
let obj = ref;
2026-07-23 10:11:24 +00:00
ref = ref.useRef(null);
trackUserProfileAction = flag(guildId[7]).useUserProfileAnalyticsContext().trackUserProfileAction;
2026-07-29 08:29:29 +00:00
const tmp5 = null != user.avatar || user.hasAvatarForGuild(guildId);
2026-07-20 16:05:17 +00:00
const items = [flag, guildId, trackUserProfileAction, user];
obj = { ref };
2026-07-29 08:29:29 +00:00
const callback = obj.useCallback(() => {
2026-07-23 10:11:24 +00:00
let obj = { action: outer1_5.VIEW_AVATAR };
2026-07-20 16:05:17 +00:00
trackUserProfileAction(obj);
2026-07-24 07:16:23 +00:00
obj = { user, guildId, animate: flag, originViewOrOriginLayout: ref.current };
2026-07-20 16:05:17 +00:00
user(guildId[8])(obj);
}, items);
const merged1 = Object.assign(merged);
2026-07-29 08:29:29 +00:00
obj.animate = flag;
obj.user = user;
obj.guildId = guildId;
let tmp10;
if (tmp5) {
tmp10 = callback;
2026-07-24 07:16:23 +00:00
}
2026-07-29 08:29:29 +00:00
obj.onPress = tmp10;
if (tmp5) {
const intl = tmp3(tmp4[9]).intl;
let accessibilityLabel = intl.string(tmp3(tmp4[9]).t.xB7MI3);
2026-07-24 07:16:23 +00:00
} else {
accessibilityLabel = merged.accessibilityLabel;
}
2026-07-29 08:29:29 +00:00
obj.accessibilityLabel = accessibilityLabel;
2026-07-24 07:16:23 +00:00
return closure_7(closure_10, obj);
2026-07-20 16:05:17 +00:00
};