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

278 lines
12 KiB
TypeScript
Raw Normal View History

2026-07-25 08:10:48 +00:00
// Module ID: 8298
2026-07-27 11:26:19 +00:00
// Function ID: 66697
2026-07-20 16:05:17 +00:00
// Name: InformationTable
2026-07-25 08:10:48 +00:00
// Dependencies: [57, 31, 27, 1348, 1918, 1850, 8043, 653, 33, 4131, 689, 8299, 1212, 5501, 5164, 1273, 3977, 4067, 566, 7922, 5462, 5482, 8045, 8300, 675, 5656, 8297, 5187, 5189, 8301, 8302, 4127, 4320, 4544, 4661, 3804, 2]
2026-07-20 16:05:17 +00:00
2026-07-25 08:10:48 +00:00
// Module 8298 (InformationTable)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
import importAllResult from "Text";
import { View } from "Background";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import closure_7 from "_isNativeReflectConstruct";
import closure_8 from "_isNativeReflectConstruct";
import { UserProfileAnalyticsTypes } from "USER_PROFILE_TOOLTIP_DELAY";
import ME from "ME";
import jsxProd from "Button";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
let closure_10;
let closure_11;
let closure_12;
let closure_13;
const require = arg1;
2026-07-20 16:05:17 +00:00
function InformationTable(speedBumpType) {
2026-07-25 08:10:48 +00:00
let obj = { icon: importDefault(8299) };
2026-07-23 10:11:24 +00:00
const intl = items(1212).intl;
obj.text = intl.string(items(1212).t.kcuWva);
items = [obj, ];
2026-07-25 08:10:48 +00:00
obj = { icon: importDefault(8299) };
2026-07-20 16:05:17 +00:00
if ("block" === speedBumpType.speedBumpType) {
2026-07-23 10:11:24 +00:00
const intl3 = items(1212).intl;
let stringResult = intl3.string(items(1212).t.QxrDY1);
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
const intl2 = items(1212).intl;
stringResult = intl2.string(items(1212).t.W6fjkS);
2026-07-20 16:05:17 +00:00
}
obj.text = stringResult;
items[1] = obj;
obj = {
hasIcons: true,
children: items.map((icon) => {
let obj = { start: 0 === arg1, end: items.length === arg1 };
2026-07-23 10:11:24 +00:00
obj = { size: items(outer1_2[15]).Icon.Sizes.MEDIUM, source: icon.icon };
obj.icon = outer1_12(items(outer1_2[15]).Icon, obj);
2026-07-20 16:05:17 +00:00
obj.label = icon.text;
2026-07-23 10:11:24 +00:00
return outer1_12(items(outer1_2[14]).TableRow, obj, arg1);
2026-07-20 16:05:17 +00:00
})
};
2026-07-24 07:16:23 +00:00
return callback2(items(5501).TableRowGroup, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
({ AnalyticEvents: closure_10, EMPTY_STRING_SNOWFLAKE_ID: closure_11 } = ME);
({ jsx: closure_12, jsxs: closure_13 } = jsxProd);
2026-07-20 16:05:17 +00:00
let obj = {};
2026-07-23 10:11:24 +00:00
obj = { paddingHorizontal: require("_createForOfIteratorHelperLoose").space.PX_16, paddingBottom: 56 };
2026-07-20 16:05:17 +00:00
obj.button = obj;
2026-07-23 10:11:24 +00:00
_createForOfIteratorHelperLoose = { marginBottom: require("_createForOfIteratorHelperLoose").space.PX_24, paddingHorizontal: require("_createForOfIteratorHelperLoose").space.PX_16 };
obj.tableContainer = _createForOfIteratorHelperLoose;
obj.header = { marginBottom: require("_createForOfIteratorHelperLoose").space.PX_24, marginHorizontal: require("_createForOfIteratorHelperLoose").space.PX_16, gap: require("_createForOfIteratorHelperLoose").space.PX_8 };
2026-07-20 16:05:17 +00:00
obj.bodyText = { textAlign: "center" };
obj.headerText = { textAlign: "center" };
obj.avatar = { alignSelf: "center" };
2026-07-23 10:11:24 +00:00
let obj3 = { position: "relative", alignSelf: "center", marginTop: require("_createForOfIteratorHelperLoose").space.PX_16 };
2026-07-20 16:05:17 +00:00
obj.avatarContainer = obj3;
2026-07-23 10:11:24 +00:00
let obj4 = { position: "absolute", bottom: -8, right: -8, padding: require("_createForOfIteratorHelperLoose").space.PX_4, backgroundColor: require("_createForOfIteratorHelperLoose").colors.BACKGROUND_SURFACE_HIGH, borderRadius: require("_createForOfIteratorHelperLoose").radii.round };
2026-07-20 16:05:17 +00:00
obj.avatarIconContainer = obj4;
2026-07-23 10:11:24 +00:00
let obj2 = { marginBottom: require("_createForOfIteratorHelperLoose").space.PX_24, marginHorizontal: require("_createForOfIteratorHelperLoose").space.PX_16, gap: require("_createForOfIteratorHelperLoose").space.PX_8 };
obj.suppress = { alignSelf: "center", marginTop: require("_createForOfIteratorHelperLoose").space.PX_16 };
let closure_14 = _createForOfIteratorHelperLoose.createStyles(obj);
let obj5 = { alignSelf: "center", marginTop: require("_createForOfIteratorHelperLoose").space.PX_16 };
2026-07-20 16:05:17 +00:00
const memoResult = importAllResult.memo(function UserProfileSpeedBumpActionSheet(userId) {
2026-07-23 10:11:24 +00:00
let _slicedToArray;
2026-07-20 16:05:17 +00:00
let messageId;
let openedAt;
let roleId;
let sessionId;
let sourceAnalyticsLocations;
userId = userId.userId;
const channelId = userId.channelId;
const onClose = userId.onClose;
2026-07-23 10:11:24 +00:00
({ location: _slicedToArray, sourceAnalyticsLocations } = userId);
2026-07-20 16:05:17 +00:00
({ messageId, roleId, sessionId, openedAt } = userId);
if (sourceAnalyticsLocations === undefined) {
sourceAnalyticsLocations = [];
}
const speedBumpType = userId.speedBumpType;
2026-07-23 10:11:24 +00:00
let stateFromStores;
let guild_id;
let stateFromStores2;
let c7;
let first;
let UserProfileAnalyticsTypes;
2026-07-20 16:05:17 +00:00
let analyticsLocations;
let createUserProfileAnalyticsContext;
2026-07-23 10:11:24 +00:00
let callback2;
2026-07-20 16:05:17 +00:00
function handleShowProfileActionSheet() {
const merged = Object.assign(createUserProfileAnalyticsContext);
2026-07-23 10:11:24 +00:00
channelId(onClose[26])({ sourceAnalyticsLocations: analyticsLocations, ignoreBlockedSpeedBump: true, location: _slicedToArray });
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let tmp = callback3();
let obj = userId(onClose[16]);
let obj1 = userId(onClose[18]);
const items = [first];
stateFromStores = obj1.useStateFromStores(items, () => first.getUser(userId));
let obj2 = userId(onClose[18]);
const items1 = [stateFromStores2];
2026-07-20 16:05:17 +00:00
const items2 = [channelId];
const stateFromStores1 = obj2.useStateFromStores(items1, () => stateFromStores2.getChannel(channelId), items2);
2026-07-23 10:11:24 +00:00
guild_id = undefined;
2026-07-20 16:05:17 +00:00
if (null != stateFromStores1) {
guild_id = stateFromStores1.guild_id;
}
2026-07-23 10:11:24 +00:00
let obj3 = userId(onClose[18]);
const items3 = [c7];
stateFromStores2 = obj3.useStateFromStores(items3, () => {
2026-07-20 16:05:17 +00:00
let member = null;
if (null != guild_id) {
2026-07-23 10:11:24 +00:00
member = _undefined.getMember(guild_id, userId);
2026-07-20 16:05:17 +00:00
}
return member;
});
let id;
2026-07-23 10:11:24 +00:00
const isThemeLightResult = obj.isThemeLight(channelId(onClose[17])());
2026-07-20 16:05:17 +00:00
if (null != stateFromStores) {
id = stateFromStores.id;
}
if (null == id) {
id = createUserProfileAnalyticsContext;
}
2026-07-23 10:11:24 +00:00
const tmp7Result = channelId(onClose[19])(id, guild_id);
c7 = tmp7Result;
const tmp10 = callback(stateFromStores.useState(false), 2);
first = tmp10[0];
UserProfileAnalyticsTypes = tmp10[1];
2026-07-20 16:05:17 +00:00
const items4 = [];
2026-07-23 10:11:24 +00:00
const tmp7 = channelId(onClose[19]);
const tmp12 = channelId(onClose[20]);
items4[HermesBuiltin.arraySpread(sourceAnalyticsLocations, 0)] = channelId(onClose[21]).IGNORED_PROFILE_ACTION_SHEET;
2026-07-20 16:05:17 +00:00
analyticsLocations = tmp12(items4).analyticsLocations;
2026-07-23 10:11:24 +00:00
let obj4 = userId(onClose[22]);
2026-07-20 16:05:17 +00:00
createUserProfileAnalyticsContext = obj4.useCreateUserProfileAnalyticsContext({ layout: "ACTION_SHEET", sourceSessionId: sessionId, userId, channelId, messageId, roleId });
2026-07-23 10:11:24 +00:00
obj = { userId, user: stateFromStores, channelId, guildId: guild_id, displayProfile: tmp7Result, guildMember: stateFromStores2, type: UserProfileAnalyticsTypes.IGNORED_USER_SHEET };
const tmp15 = channelId(onClose[23])(obj);
callback2 = tmp15;
2026-07-20 16:05:17 +00:00
const items5 = [tmp15, tmp7Result, guild_id, first, stateFromStores2];
2026-07-23 10:11:24 +00:00
const effect = stateFromStores.useEffect(() => {
2026-07-20 16:05:17 +00:00
let tmp = first;
if (!first) {
2026-07-23 10:11:24 +00:00
tmp = null == c7;
2026-07-20 16:05:17 +00:00
}
if (!tmp) {
let tmp6 = null == guild_id;
if (!tmp6) {
let prop;
if (null != stateFromStores2) {
prop = stateFromStores2.fullProfileLoadedTimestamp;
}
tmp6 = null != prop;
}
if (tmp6) {
2026-07-23 10:11:24 +00:00
channelId(onClose[24]).track(analyticsLocations.OPEN_POPOUT, c12);
2026-07-20 16:05:17 +00:00
callback(true);
const obj = channelId(onClose[24]);
}
}
}, items5);
const items6 = [onClose];
2026-07-23 10:11:24 +00:00
const effect1 = stateFromStores.useEffect(() => () => {
if (null != outer1_2) {
outer1_2();
2026-07-20 16:05:17 +00:00
}
}, items6);
const items7 = [stateFromStores, userId];
2026-07-23 10:11:24 +00:00
const effect2 = stateFromStores.useEffect(() => {
2026-07-20 16:05:17 +00:00
if (null == stateFromStores) {
const user = userId(onClose[25]).getUser(userId);
const obj = userId(onClose[25]);
}
}, items7);
if (null == stateFromStores) {
return null;
} else {
obj = { value: analyticsLocations };
obj1 = { value: createUserProfileAnalyticsContext, openedAt };
let fetchStartedAt;
if (null != tmp7Result) {
fetchStartedAt = tmp7Result.fetchStartedAt;
}
obj1.fetchStartedAt = fetchStartedAt;
let fetchEndedAt;
if (null != tmp7Result) {
fetchEndedAt = tmp7Result.fetchEndedAt;
}
obj1.fetchEndedAt = fetchEndedAt;
let isLoaded;
if (null != tmp7Result) {
isLoaded = tmp7Result.isLoaded;
}
obj1.isLoaded = isLoaded;
obj2 = { startExpanded: true };
obj3 = {};
obj4 = { style: tmp.header };
const obj5 = { style: tmp.avatarContainer };
2026-07-23 10:11:24 +00:00
const obj6 = { user: stateFromStores, guildId: guild_id, animate: false, size: userId(onClose[15]).AvatarSizes.XLARGE, style: tmp.avatar };
const items8 = [callback2(userId(onClose[15]).Avatar, obj6), ];
2026-07-20 16:05:17 +00:00
const obj7 = { style: tmp.avatarIconContainer };
2026-07-23 10:11:24 +00:00
const obj8 = { size: userId(onClose[15]).Icon.Sizes.MEDIUM };
2026-07-20 16:05:17 +00:00
if ("block" === speedBumpType) {
obj8.source = tmp32(tmp31[29]);
let tmp33 = obj8;
} else {
obj8.source = tmp32(tmp31[30]);
tmp33 = obj8;
}
2026-07-23 10:11:24 +00:00
obj7.children = callback2(userId(onClose[15]).Icon, tmp33);
items8[1] = callback2(guild_id, obj7);
2026-07-20 16:05:17 +00:00
obj5.children = items8;
2026-07-23 10:11:24 +00:00
const items9 = [handleShowProfileActionSheet(guild_id, obj5), , ];
const obj9 = { style: tmp.headerText, variant: "heading-xl/bold", color: "mobile-text-heading-primary", accessibilityRole: "header" };
const intl = userId(onClose[12]).intl;
obj9.children = intl.string(userId(onClose[12]).t.b33pLD);
items9[1] = callback2(userId(onClose[31]).Text, obj9);
const obj10 = { style: tmp.bodyText, variant: "text-md/medium", color: "mobile-text-heading-primary" };
const intl2 = userId(onClose[12]).intl;
const t = userId(onClose[12]).t;
2026-07-20 16:05:17 +00:00
const obj11 = {};
2026-07-23 10:11:24 +00:00
let obj16 = channelId(onClose[32]);
2026-07-20 16:05:17 +00:00
obj11.username = obj16.getName(guild_id, channelId, stateFromStores);
2026-07-23 10:11:24 +00:00
obj10.children = intl2.format("block" === speedBumpType ? t["8F+WNz"] : t["/cZp5s"], obj11);
items9[2] = callback2(userId(onClose[31]).Text, obj10);
2026-07-20 16:05:17 +00:00
obj4.children = items9;
2026-07-23 10:11:24 +00:00
const items10 = [handleShowProfileActionSheet(guild_id, obj4), , ];
2026-07-20 16:05:17 +00:00
const obj12 = { style: tmp.tableContainer };
const obj13 = { speedBumpType };
2026-07-23 10:11:24 +00:00
obj12.children = callback2(InformationTable, obj13);
items10[1] = callback2(guild_id, obj12);
2026-07-20 16:05:17 +00:00
const obj14 = { style: tmp.button };
const obj15 = {};
let str = "secondary";
if (isThemeLightResult) {
str = "tertiary";
}
obj15.variant = str;
obj15.size = "lg";
2026-07-23 10:11:24 +00:00
const intl3 = userId(onClose[12]).intl;
obj15.text = intl3.string(userId(onClose[12]).t["UJKH/l"]);
2026-07-20 16:05:17 +00:00
obj15.onPress = handleShowProfileActionSheet;
2026-07-23 10:11:24 +00:00
const items11 = [callback2(userId(onClose[33]).Button, obj15), ];
2026-07-20 16:05:17 +00:00
let tmp52 = null;
if ("ignore" === speedBumpType) {
obj16 = {
style: tmp.suppress,
accessibilityRole: "button",
onPress() {
const IgnoreProfileSpeedbumpDisabled = userId(onClose[35]).IgnoreProfileSpeedbumpDisabled;
IgnoreProfileSpeedbumpDisabled.updateSetting(true);
handleShowProfileActionSheet();
}
};
2026-07-23 10:11:24 +00:00
const obj17 = { variant: "text-sm/normal", color: "text-link" };
const intl4 = userId(onClose[12]).intl;
obj17.children = intl4.string(userId(onClose[12]).t.QbcRCJ);
obj16.children = callback2(userId(onClose[31]).Text, obj17);
tmp52 = callback2(userId(onClose[34]).PressableOpacity, obj16);
2026-07-20 16:05:17 +00:00
}
items11[1] = tmp52;
obj14.children = items11;
2026-07-23 10:11:24 +00:00
items10[2] = handleShowProfileActionSheet(guild_id, obj14);
2026-07-20 16:05:17 +00:00
obj3.children = items10;
2026-07-23 10:11:24 +00:00
obj2.children = handleShowProfileActionSheet(userId(onClose[28]).BottomSheetView, obj3);
obj1.children = callback2(userId(onClose[27]).BottomSheet, obj2);
obj.children = callback2(userId(onClose[22]).UserProfileAnalyticsProvider, obj1);
return callback2(userId(onClose[20]).AnalyticsLocationProvider, obj);
2026-07-20 16:05:17 +00:00
}
const arraySpreadResult = HermesBuiltin.arraySpread(sourceAnalyticsLocations, 0);
});
2026-07-23 10:11:24 +00:00
const result = require("get ActivityIndicator").fileFinishedImporting("modules/user_profile/native/UserProfileSpeedBumpActionSheet.tsx");
2026-07-20 16:05:17 +00:00
export default memoResult;