decord/source/modules/guild_identity/native/EditGuildIdentityAvatar.tsx

125 lines
4.9 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 14142
// Function ID: 14143
2026-07-20 16:05:17 +00:00
// Name: EditGuildIdentityAvatar
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 1991, 1922, 676, 1924, 21, 4668, 589, 7177, 7197, 8408, 14095, 8423, 4042, 8415, 8510, 4346, 14096, 2008, 14097, 14097, 8406, 5438, 1236, 8448, 14098, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 14142 (EditGuildIdentityAvatar)
import closure_3 from "noop" /* 19 */;
import closure_4 from "trackCommunicationDisabled" /* 1991 */;
import closure_5 from "mergeGuildAvatar" /* 1922 */;
import ME from "ME" /* 676 */;
import { PremiumUpsellTypes } from "GuildFeatures" /* 1924 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
({ AnalyticsSections: closure_6, AnalyticsObjects: error, UpsellTypes: closure_8 } = ME);
2026-07-29 08:29:29 +00:00
({ jsx: c10, jsxs: unpackModuleId } = jsxProd);
let closure_12 = createCacheKey.createStyles({ editAvatarIcon: { position: "absolute", right: 0 } });
2026-08-24 06:08:38 +00:00
let result = require("set").fileFinishedImporting("modules/guild_identity/native/EditGuildIdentityAvatar.tsx");
2026-07-20 16:05:17 +00:00
export default function EditGuildIdentityAvatar(userId) {
const guildId = userId.guildId;
({ disabled, disableStatus } = userId);
if (disableStatus === undefined) {
disableStatus = true;
}
2026-07-23 10:11:24 +00:00
let stateFromStores;
let stateFromStores1;
let analyticsLocations;
setPendingAvatar = undefined;
2026-08-24 06:08:38 +00:00
closure_5 = undefined;
c6 = undefined;
closure_7 = undefined;
c8 = undefined;
let avatarDecoration;
2026-07-20 16:05:17 +00:00
({ style, statusStyle, avatarStyle } = userId);
2026-07-23 10:11:24 +00:00
let obj = guildId(stateFromStores1[7]);
2026-08-24 06:08:38 +00:00
const items = [closure_5];
stateFromStores = obj.useStateFromStores(items, () => currentUser.getCurrentUser());
obj1 = guildId(stateFromStores1[7]);
2026-07-23 10:11:24 +00:00
const items1 = [setPendingAvatar];
stateFromStores1 = obj1.useStateFromStores(items1, () => {
2026-07-20 16:05:17 +00:00
let member = null;
if (null != stateFromStores) {
let id;
2026-07-29 08:29:29 +00:00
if (tmp != null) {
id = tmp.id;
2026-07-20 16:05:17 +00:00
}
member = setPendingAvatar.getMember(guildId, id);
2026-07-29 08:29:29 +00:00
const tmp4 = guildId;
2026-07-20 16:05:17 +00:00
}
return member;
});
2026-07-29 08:29:29 +00:00
let tmp = callback();
2026-07-23 10:11:24 +00:00
analyticsLocations = stateFromStores(stateFromStores1[8])(stateFromStores(stateFromStores1[9]).EDIT_AVATAR).analyticsLocations;
2026-07-29 08:29:29 +00:00
const tmp7 = stateFromStores(stateFromStores1[8]);
2026-07-23 10:11:24 +00:00
({ pendingAvatar, pendingAvatarDecoration, setPendingAvatar } = stateFromStores(stateFromStores1[10])({ guildId, analyticsLocations }));
2026-07-29 08:29:29 +00:00
const tmp9 = stateFromStores(stateFromStores1[11])({ guildId, analyticsLocations });
2026-08-24 06:08:38 +00:00
closure_5 = tmp9;
2026-07-29 08:29:29 +00:00
const tmp8 = stateFromStores(stateFromStores1[10])({ guildId, analyticsLocations });
2026-07-23 10:11:24 +00:00
const pendingAvatarSrc = guildId(stateFromStores1[12]).getPendingAvatarSrc({ userId: userId.userId, image: pendingAvatar });
const obj3 = guildId(stateFromStores1[12]);
let result = stateFromStores(stateFromStores1[13]).canUsePremiumGuildMemberProfile(stateFromStores);
c6 = result;
const obj4 = stateFromStores(stateFromStores1[13]);
2026-07-29 08:29:29 +00:00
const tmp12 = !stateFromStores(stateFromStores1[13]).canUseAnimatedAvatar(stateFromStores);
2026-08-24 06:08:38 +00:00
closure_7 = tmp12;
2026-07-23 10:11:24 +00:00
const obj5 = stateFromStores(stateFromStores1[13]);
2026-07-20 16:05:17 +00:00
let avatar;
2026-07-29 08:29:29 +00:00
if (stateFromStores1 != null) {
2026-07-20 16:05:17 +00:00
avatar = stateFromStores1.avatar;
}
2026-07-23 10:11:24 +00:00
const showRemoveAvatarResult = guildId(stateFromStores1[14]).showRemoveAvatar(pendingAvatar, avatar);
c8 = showRemoveAvatarResult;
2026-07-29 08:29:29 +00:00
let tmp15 = pendingAvatarDecoration;
2026-07-20 16:05:17 +00:00
if (undefined === pendingAvatarDecoration) {
2026-08-24 06:08:38 +00:00
avatarDecoration = undefined;
2026-07-29 08:29:29 +00:00
if (stateFromStores1 != null) {
2026-07-20 16:05:17 +00:00
avatarDecoration = stateFromStores1.avatarDecoration;
}
2026-07-29 08:29:29 +00:00
tmp15 = avatarDecoration;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
avatarDecoration = tmp15;
2026-07-29 08:29:29 +00:00
const items2 = [guildId, stateFromStores1, stateFromStores, result, tmp12, showRemoveAvatarResult, tmp15, analyticsLocations, tmp9, setPendingAvatar];
let tmp19Result = null;
2026-07-20 16:05:17 +00:00
if (null != stateFromStores) {
2026-07-29 08:29:29 +00:00
obj = { style: null, disabled: null, onPress: null, accessibilityRole: "button", accessibilityLabel: null, children: null };
obj[0] = style;
obj[1] = disabled;
obj[2] = tmp17;
const intl = tmp2(tmp3[23]).intl;
obj[4] = intl.string(tmp2(tmp3[23]).t["70lEQe"]);
obj = { user: null, guildId: null, pendingAvatarSrc: null, pendingAvatarDecoration: null, statusStyle: null, disableStatus: null, style: null };
obj[0] = stateFromStores;
2026-07-20 16:05:17 +00:00
let tmp23;
if (null !== pendingAvatar) {
tmp23 = guildId;
}
2026-07-29 08:29:29 +00:00
obj[1] = tmp23;
2026-07-20 16:05:17 +00:00
let tmp24;
if (null !== pendingAvatar) {
tmp24 = pendingAvatarSrc;
}
2026-07-29 08:29:29 +00:00
obj[2] = tmp24;
obj[3] = pendingAvatarDecoration;
obj[4] = statusStyle;
obj[5] = disableStatus;
obj[6] = avatarStyle;
const items3 = [closure_10(tmp6(tmp3[24]), obj), ];
let tmp20Result = !disabled;
if (!disabled) {
obj1 = { style: null };
obj1[0] = tmp.editAvatarIcon;
tmp20Result = tmp20(tmp6(tmp3[25]), obj1);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
items3[1] = tmp20Result;
obj[5] = items3;
tmp19Result = closure_11(tmp2(tmp3[22]).PressableOpacity, obj);
const tmp19 = closure_11;
const tmp6Result = tmp6(tmp3[24]);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return tmp19Result;
2026-07-20 16:05:17 +00:00
};