decord/source/modules/guild_identity/native/EditGuildIdentityAvatar.tsx
github-actions 7450227d0b chore: update source for alpha 345.4
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9596_m.js (380.6 MB)
2026-09-04 17:41:35 +00:00

124 lines
4.9 KiB
TypeScript

// Module ID: 14578
// Function ID: 14579
// Name: EditGuildIdentityAvatar
// Dependencies: [19, 1991, 1921, 673, 1923, 21, 4481, 586, 7102, 7122, 8090, 14534, 8100, 4139, 8097, 9242, 4448, 14535, 2008, 14536, 14536, 8088, 5084, 1233, 8187, 14537, 2]
// Exports: default
// Module 14578 (EditGuildIdentityAvatar)
import closure_3 from "noop" /* 19 */;
import closure_4 from "trackCommunicationDisabled" /* 1991 */;
import closure_5 from "mergeGuildAvatar" /* 1921 */;
import ME from "ME" /* 673 */;
import { PremiumUpsellTypes } from "GuildFeatures" /* 1923 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4481 */;
const require = arg1;
({ AnalyticsSections: closure_6, AnalyticsObjects: error, UpsellTypes: closure_8 } = ME);
({ jsx: c10, jsxs: unpackModuleId } = jsxProd);
let closure_12 = createCacheKey.createStyles({ editAvatarIcon: { position: "absolute", right: 0 } });
let result = require("set").fileFinishedImporting("modules/guild_identity/native/EditGuildIdentityAvatar.tsx");
export default function EditGuildIdentityAvatar(userId) {
const guildId = userId.guildId;
({ disabled, disableStatus } = userId);
if (disableStatus === undefined) {
disableStatus = true;
}
let stateFromStores;
let stateFromStores1;
let analyticsLocations;
setPendingAvatar = undefined;
closure_5 = undefined;
c6 = undefined;
closure_7 = undefined;
c8 = undefined;
let avatarDecoration;
({ style, statusStyle, avatarStyle } = userId);
let obj = guildId(stateFromStores1[7]);
const items = [closure_5];
stateFromStores = obj.useStateFromStores(items, () => currentUser.getCurrentUser());
obj1 = guildId(stateFromStores1[7]);
const items1 = [setPendingAvatar];
stateFromStores1 = obj1.useStateFromStores(items1, () => {
let member = null;
if (null != stateFromStores) {
let id;
if (tmp != null) {
id = tmp.id;
}
member = setPendingAvatar.getMember(guildId, id);
const tmp4 = guildId;
}
return member;
});
let tmp = callback();
analyticsLocations = stateFromStores(stateFromStores1[8])(stateFromStores(stateFromStores1[9]).EDIT_AVATAR).analyticsLocations;
const tmp7 = stateFromStores(stateFromStores1[8]);
({ pendingAvatar, pendingAvatarDecoration, setPendingAvatar } = stateFromStores(stateFromStores1[10])({ guildId, analyticsLocations }));
const tmp9 = stateFromStores(stateFromStores1[11])({ guildId, analyticsLocations });
closure_5 = tmp9;
const tmp8 = stateFromStores(stateFromStores1[10])({ guildId, analyticsLocations });
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]);
const tmp12 = !stateFromStores(stateFromStores1[13]).canUseAnimatedAvatar(stateFromStores);
closure_7 = tmp12;
const obj5 = stateFromStores(stateFromStores1[13]);
let avatar;
if (stateFromStores1 != null) {
avatar = stateFromStores1.avatar;
}
const showRemoveAvatarResult = guildId(stateFromStores1[14]).showRemoveAvatar(pendingAvatar, avatar);
c8 = showRemoveAvatarResult;
let tmp15 = pendingAvatarDecoration;
if (undefined === pendingAvatarDecoration) {
avatarDecoration = undefined;
if (stateFromStores1 != null) {
avatarDecoration = stateFromStores1.avatarDecoration;
}
tmp15 = avatarDecoration;
}
avatarDecoration = tmp15;
const items2 = [guildId, stateFromStores1, stateFromStores, result, tmp12, showRemoveAvatarResult, tmp15, analyticsLocations, tmp9, setPendingAvatar];
let tmp19Result = null;
if (null != stateFromStores) {
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;
let tmp23;
if (null !== pendingAvatar) {
tmp23 = guildId;
}
obj[1] = tmp23;
let tmp24;
if (null !== pendingAvatar) {
tmp24 = pendingAvatarSrc;
}
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);
}
items3[1] = tmp20Result;
obj[5] = items3;
tmp19Result = closure_11(tmp2(tmp3[22]).PressableOpacity, obj);
const tmp19 = closure_11;
const tmp6Result = tmp6(tmp3[24]);
}
return tmp19Result;
};