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

87 lines
3 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 8307
// Function ID: 65397
2026-07-20 16:05:17 +00:00
// Name: OpenableUserProfileAvatar
2026-07-24 07:16:23 +00:00
// Dependencies: [31, 27, 8308, 5510, 33, 8282, 7967, 8310, 8317, 1212, 2]
2026-07-20 16:05:17 +00:00
// Exports: OpenableUserProfileAvatar
2026-07-24 07:16:23 +00:00
// Module 8307 (OpenableUserProfileAvatar)
2026-07-23 10:11:24 +00:00
import importAllResult from "result";
import { View } from "get ActivityIndicator";
import { TrackUserProfileActions } from "USER_PROFILE_TOOLTIP_DELAY";
import { AVATAR_SIZE_VARIANT } from "ARBITRARY_LARGE_OFFSET";
import jsxProd from "jsxProd";
let closure_7;
let closure_8;
let closure_9;
const require = arg1;
({ jsx: closure_7, Fragment: closure_8, jsxs: closure_9 } = 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;
}
let obj = Object.create(null);
obj.backgroundColor = 0;
obj.size = 0;
const merged = Object.assign(backgroundColor, obj);
2026-07-24 07:16:23 +00:00
const tmp3 = importDefault(8282)();
2026-07-20 16:05:17 +00:00
obj = {};
const items = [, , ];
({ avatarBackground: arr[0], avatarPosition: arr[1] } = tmp3);
items[2] = { backgroundColor: backgroundColor.backgroundColor };
const items1 = [callback(View, { style: items }), ];
obj = { ref, style: items2 };
2026-07-23 10:11:24 +00:00
items2 = [, ];
2026-07-20 16:05:17 +00:00
({ avatar: arr3[0], avatarPosition: arr3[1] } = tmp3);
obj.size = size;
const merged1 = Object.assign(merged);
2026-07-24 07:16:23 +00:00
items1[1] = callback(importDefault(7967), obj);
2026-07-20 16:05:17 +00:00
obj.children = items1;
return callback2(closure_8, obj);
});
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-23 10:11:24 +00:00
let obj = { animate: 0, user: 0, guildId: 0 };
2026-07-20 16:05:17 +00:00
Object.setPrototypeOf(null);
const merged = Object.assign(animate, obj);
2026-07-23 10:11:24 +00:00
let ref;
let trackUserProfileAction;
ref = ref.useRef(null);
trackUserProfileAction = flag(guildId[7]).useUserProfileAnalyticsContext().trackUserProfileAction;
2026-07-24 07:16:23 +00:00
const tmp4 = null != user.avatar || user.hasAvatarForGuild(guildId);
2026-07-20 16:05:17 +00:00
const items = [flag, guildId, trackUserProfileAction, user];
obj = { ref };
2026-07-23 10:11:24 +00:00
const callback = ref.useCallback(() => {
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);
obj["animate"] = flag;
obj["user"] = user;
obj["guildId"] = guildId;
2026-07-24 07:16:23 +00:00
let tmp9;
if (tmp4) {
tmp9 = callback;
}
obj["onPress"] = tmp9;
if (tmp4) {
const intl = flag(guildId[9]).intl;
let accessibilityLabel = intl.string(flag(guildId[9]).t.xB7MI3);
} else {
accessibilityLabel = merged.accessibilityLabel;
}
obj["accessibilityLabel"] = accessibilityLabel;
return closure_7(closure_10, obj);
2026-07-20 16:05:17 +00:00
};