decord/source/modules/safety_hub/native/SafetyHubAccountStanding.tsx

196 lines
10 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 14178
// Function ID: 14179
2026-07-20 16:05:17 +00:00
// Name: items
2026-08-24 06:08:38 +00:00
// Dependencies: [32, 19, 17, 1922, 11100, 5443, 21, 5444, 14179, 4668, 712, 1236, 4339, 8113, 8953, 7379, 8617, 589, 1435, 9256, 1297, 4739, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 14178 (items)
import ThemesDefault from "Themes" /* 712 */;
import closure_3 from "_slicedToArray" /* 32 */;
import closure_4 from "noop" /* 19 */;
import { View } from "get ActivityIndicator" /* 17 */;
import closure_6 from "mergeGuildAvatar" /* 1922 */;
import closure_7 from "handleSafetyHubRequestAgeVerificationResetModalAction" /* 11100 */;
import { SafetyHubLinks } from "SafetyHubView" /* 5443 */;
import jsxProd from "jsxProd" /* 21 */;
import createCacheKey from "createCacheKey" /* 4668 */;
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-29 08:29:29 +00:00
({ jsx: c9, jsxs: c10 } = jsxProd);
2026-08-24 06:08:38 +00:00
let obj = { [arg1(5444).AccountStandingState.ALL_GOOD]: { left: "0%" } };
2026-07-29 08:29:29 +00:00
obj = { left: "25%", transform: null };
2026-08-24 06:08:38 +00:00
obj = { translateX: -0.5 * require("SafetyHubAccountStandingSubwayMarker").SUBWAY_MARKER_WIDTH };
2026-07-23 10:11:24 +00:00
let items = [obj];
2026-07-29 08:29:29 +00:00
obj[1] = items;
2026-07-23 10:11:24 +00:00
obj[require("ContentIdType").AccountStandingState.LIMITED] = obj;
2026-07-29 08:29:29 +00:00
let obj1 = { left: "50%", transform: null };
2026-08-24 06:08:38 +00:00
let items1 = [{ translateX: -0.5 * require("SafetyHubAccountStandingSubwayMarker").SUBWAY_MARKER_WIDTH }];
2026-07-29 08:29:29 +00:00
obj1[1] = items1;
2026-07-23 10:11:24 +00:00
obj[require("ContentIdType").AccountStandingState.VERY_LIMITED] = obj1;
2026-07-29 08:29:29 +00:00
let obj3 = { left: "75%", transform: null };
2026-08-24 06:08:38 +00:00
let obj2 = { translateX: -0.5 * require("SafetyHubAccountStandingSubwayMarker").SUBWAY_MARKER_WIDTH };
let items2 = [{ translateX: -0.5 * require("SafetyHubAccountStandingSubwayMarker").SUBWAY_MARKER_WIDTH }];
2026-07-29 08:29:29 +00:00
obj3[1] = items2;
2026-07-23 10:11:24 +00:00
obj[require("ContentIdType").AccountStandingState.AT_RISK] = obj3;
2026-07-29 08:29:29 +00:00
const obj5 = { left: "100%", transform: null };
2026-08-24 06:08:38 +00:00
let obj4 = { translateX: -0.5 * require("SafetyHubAccountStandingSubwayMarker").SUBWAY_MARKER_WIDTH };
let items3 = [{ translateX: -require("SafetyHubAccountStandingSubwayMarker").SUBWAY_MARKER_WIDTH }];
2026-07-29 08:29:29 +00:00
obj5[1] = items3;
2026-07-23 10:11:24 +00:00
obj[require("ContentIdType").AccountStandingState.SUSPENDED] = obj5;
2026-07-29 08:29:29 +00:00
const obj7 = { container: null, avatarBackground: null, good: null, limited: null, veryLimited: null, atRisk: null, suspended: null, body: null, bodyText: null, health: null, line: null, subwayMarker: null, icon: null };
2026-08-24 06:08:38 +00:00
let obj6 = { translateX: -require("SafetyHubAccountStandingSubwayMarker").SUBWAY_MARKER_WIDTH };
obj7[0] = { display: "flex", flexDirection: "column", rowGap: 12, padding: 24, alignItems: "center", justifyContent: "center", backgroundColor: ThemesDefault.colors.CARD_BACKGROUND_DEFAULT, borderRadius: ThemesDefault.radii.md };
createCacheKey = { position: "relative", justifyContent: "center", alignItems: "center", padding: ThemesDefault.space.PX_4, backgroundColor: ThemesDefault.colors.BACKGROUND_MOD_STRONG, borderRadius: ThemesDefault.radii.round };
2026-07-29 08:29:29 +00:00
obj7[1] = createCacheKey;
2026-08-24 06:08:38 +00:00
const obj8 = { display: "flex", flexDirection: "column", rowGap: 12, padding: 24, alignItems: "center", justifyContent: "center", backgroundColor: ThemesDefault.colors.CARD_BACKGROUND_DEFAULT, borderRadius: ThemesDefault.radii.md };
obj7[2] = { color: ThemesDefault.colors.STATUS_POSITIVE };
const obj10 = { color: ThemesDefault.colors.STATUS_POSITIVE };
obj7[3] = { color: ThemesDefault.colors.STATUS_WARNING };
2026-07-29 08:29:29 +00:00
obj7[4] = { color: "#FF7A00" };
2026-08-24 06:08:38 +00:00
const obj11 = { color: ThemesDefault.colors.STATUS_WARNING };
obj7[5] = { color: ThemesDefault.colors.ICON_FEEDBACK_CRITICAL };
const obj12 = { color: ThemesDefault.colors.ICON_FEEDBACK_CRITICAL };
obj7[6] = { color: ThemesDefault.colors.ICON_FEEDBACK_CRITICAL };
2026-07-29 08:29:29 +00:00
obj7[7] = { display: "flex", rowGap: 40, width: "100%" };
2026-08-24 06:08:38 +00:00
const obj13 = { color: ThemesDefault.colors.ICON_FEEDBACK_CRITICAL };
obj7[8] = { rowGap: ThemesDefault.space.PX_8 };
2026-07-29 08:29:29 +00:00
obj7[9] = { position: "relative", left: 0, right: 0, marginBottom: 18 };
2026-08-24 06:08:38 +00:00
const obj14 = { rowGap: ThemesDefault.space.PX_8 };
obj7[10] = { height: 3, width: "100%", position: "absolute", top: 8.5, backgroundColor: ThemesDefault.colors.BACKGROUND_BASE_LOWEST };
2026-07-29 08:29:29 +00:00
obj7[11] = { position: "absolute" };
2026-08-24 06:08:38 +00:00
const obj15 = { height: 3, width: "100%", position: "absolute", top: 8.5, backgroundColor: ThemesDefault.colors.BACKGROUND_BASE_LOWEST };
obj7[12] = { borderRadius: ThemesDefault.radii.round, backgroundColor: ThemesDefault.colors.BACKGROUND_SURFACE_HIGH };
2026-07-29 08:29:29 +00:00
let closure_12 = createCacheKey.createStyles(obj7);
2026-08-24 06:08:38 +00:00
const obj16 = { borderRadius: ThemesDefault.radii.round, backgroundColor: ThemesDefault.colors.BACKGROUND_SURFACE_HIGH };
const result = require("set").fileFinishedImporting("modules/safety_hub/native/SafetyHubAccountStanding.tsx");
2026-07-20 16:05:17 +00:00
export default function SafetyHubAccountStanding() {
2026-07-23 10:11:24 +00:00
accountStanding = accountStanding.getAccountStanding();
const tmp2 = callback(memo.useState(0), 2);
2026-07-20 16:05:17 +00:00
const first = tmp2[0];
2026-08-24 06:08:38 +00:00
dependencyMap = tmp2[1];
2026-07-29 08:29:29 +00:00
const tmp4 = callback2();
2026-07-23 10:11:24 +00:00
callback = tmp4;
let items = [tmp4];
memo = memo.useMemo(() => {
2026-08-24 06:08:38 +00:00
obj = {};
obj = { title: accountStanding(1236).t.uaKrRi, description: null, status: null, style: null, CustomIcon: null };
2026-07-29 08:29:29 +00:00
const intl = accountStanding(1236).intl;
2026-08-24 06:08:38 +00:00
obj = { termsOfService: closure_1_8.TOS_LINK, communityGuidelines: closure_1_8.COMMUNITY_GUIDELINES };
2026-07-29 08:29:29 +00:00
obj[1] = intl.format(accountStanding(1236).t.pEdBD4, obj);
obj[2] = accountStanding(1236).t["/Idfao"];
2026-08-24 06:08:38 +00:00
obj[3] = closure_3.good;
obj[4] = accountStanding(4339).CircleCheckIcon;
obj[accountStanding(5444).AccountStandingState.ALL_GOOD] = obj;
obj1 = { title: accountStanding(1236).t.epkcmS, description: null, status: null, style: null, CustomIcon: null, iconSource: null };
2026-07-29 08:29:29 +00:00
const intl2 = accountStanding(1236).intl;
obj1[1] = intl2.string(accountStanding(1236).t["774juc"]);
obj1[2] = accountStanding(1236).t.umleq4;
2026-08-24 06:08:38 +00:00
obj1[3] = closure_3.limited;
obj1[4] = accountStanding(8113).CircleErrorIcon;
obj1[5] = first(8953);
obj[accountStanding(5444).AccountStandingState.LIMITED] = obj1;
const obj2 = { title: accountStanding(1236).t.crzE2X, description: null, status: null, style: null, CustomIcon: null, iconSource: null };
2026-07-29 08:29:29 +00:00
const intl3 = accountStanding(1236).intl;
obj2[1] = intl3.string(accountStanding(1236).t["T/Ufh9"]);
obj2[2] = accountStanding(1236).t.WBtMHf;
2026-08-24 06:08:38 +00:00
obj2[3] = closure_3.veryLimited;
obj2[4] = accountStanding(8113).CircleErrorIcon;
obj2[5] = first(8953);
obj[accountStanding(5444).AccountStandingState.VERY_LIMITED] = obj2;
const obj3 = { title: accountStanding(1236).t.XRNVzO, description: null, status: null, style: null, CustomIcon: null, iconSource: null };
2026-07-29 08:29:29 +00:00
const intl4 = accountStanding(1236).intl;
obj3[1] = intl4.string(accountStanding(1236).t["hbH+9S"]);
obj3[2] = accountStanding(1236).t["7f+4Lg"];
2026-08-24 06:08:38 +00:00
obj3[3] = closure_3.atRisk;
obj3[4] = accountStanding(8113).CircleErrorIcon;
obj3[5] = first(8953);
obj[accountStanding(5444).AccountStandingState.AT_RISK] = obj3;
const obj4 = { title: accountStanding(1236).t.MExFkz, description: null, status: null, style: null, CustomIcon: null, iconSource: null };
2026-07-29 08:29:29 +00:00
const intl5 = accountStanding(1236).intl;
obj4[1] = intl5.string(accountStanding(1236).t["2liUvt"]);
obj4[2] = accountStanding(1236).t["0OONGB"];
2026-08-24 06:08:38 +00:00
obj4[3] = closure_3.suspended;
obj4[4] = accountStanding(7379).CircleXIcon;
obj4[5] = first(8617);
obj[accountStanding(5444).AccountStandingState.SUSPENDED] = obj4;
2026-07-20 16:05:17 +00:00
return obj;
}, items);
const items1 = [accountStanding, memo, first, tmp4];
2026-07-23 10:11:24 +00:00
const memo1 = memo.useMemo(() => {
2026-07-20 16:05:17 +00:00
const entries = Object.entries(memo);
2026-07-29 08:29:29 +00:00
return entries.map((arg0, arg1) => {
2026-07-20 16:05:17 +00:00
[tmp, tmp2] = arg0;
const parsed = parseInt(tmp);
2026-08-24 06:08:38 +00:00
obj = { style: items, children: null };
items = [closure_3.subwayMarker, closure_1_11[parsed]];
2026-07-29 08:29:29 +00:00
obj = { selectedIcon: null, style: null, status: null, isSelected: null, index: null, onLayout: null, size: 20, numOptions: null };
obj = { style: null, color: null };
2026-08-24 06:08:38 +00:00
obj1 = {};
const merged = Object.assign(closure_3.icon);
2026-07-29 08:29:29 +00:00
obj1.width = 20;
obj1.height = 20;
obj[0] = obj1;
obj[1] = tmp2.style.color;
2026-08-24 06:08:38 +00:00
obj[0] = closure_1_9(tmp2.CustomIcon, obj);
2026-07-29 08:29:29 +00:00
({ style: obj2[1], status: obj2[2] } = tmp2);
obj[3] = parsed === state.state;
obj[4] = arg1;
obj[5] = function onLayout(nativeEvent) {
if (nativeEvent.nativeEvent.layout.height > closure_1) {
callback(nativeEvent.nativeEvent.layout.height);
2026-07-20 16:05:17 +00:00
}
};
2026-08-24 06:08:38 +00:00
obj[7] = Object.keys(closure_4).length;
obj[1] = closure_1_9(closure_1_1(closure_1_2[8]), obj, arg1);
return closure_1_9(closure_1_5, obj, arg1);
2026-07-20 16:05:17 +00:00
});
}, items1);
2026-08-24 06:08:38 +00:00
obj = accountStanding(589);
const items2 = [closure_6];
2026-07-29 08:29:29 +00:00
const stateFromStores = obj.useStateFromStores(items2, () => currentUser.getCurrentUser());
2026-07-20 16:05:17 +00:00
if (null != stateFromStores) {
2026-08-24 06:08:38 +00:00
obj1 = first(1435);
2026-07-20 16:05:17 +00:00
let userAvatarSource = obj1.getUserAvatarSource(stateFromStores);
} else {
2026-08-24 06:08:38 +00:00
userAvatarSource = first(9256);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
const style = tmp13.style;
2026-07-29 08:29:29 +00:00
obj = { style: items3, children: null };
2026-07-23 10:11:24 +00:00
items3 = [tmp4.container];
2026-07-29 08:29:29 +00:00
obj = { style: tmp4.avatarBackground, children: null };
2026-07-20 16:05:17 +00:00
({ title, description } = memo[accountStanding.state]);
2026-08-24 06:08:38 +00:00
obj1 = { source: userAvatarSource, size: tmp7(1297).AvatarSizes.XXLARGE, "aria-label": null };
2026-07-29 08:29:29 +00:00
let str;
if (stateFromStores != null) {
str = stateFromStores.username;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (str == null) {
str = "";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj1[2] = str;
obj[1] = closure_9(accountStanding(1297).Avatar, obj1);
const items4 = [closure_9(style, obj), ];
let obj2 = { style: tmp4.body, children: null };
let obj3 = { style: tmp4.bodyText, children: null };
let obj4 = { variant: "heading-lg/medium", color: "text-default", style: { textAlign: "center" }, children: null };
let intl = tmp7(1236).intl;
obj4[3] = intl.format(title, {
2026-07-20 16:05:17 +00:00
hook(children) {
2026-08-24 06:08:38 +00:00
return closure_1_9(accountStanding(4739).Text, { style, variant: "heading-lg/bold", children }, arg1);
2026-07-20 16:05:17 +00:00
}
});
2026-08-24 06:08:38 +00:00
const items5 = [closure_9(accountStanding(4739).Text, obj4), closure_9(accountStanding(4739).Text, { variant: "text-sm/medium", color: "text-muted", style: { textAlign: "center" }, children: description })];
2026-07-29 08:29:29 +00:00
obj3[1] = items5;
const items6 = [closure_10(style, obj3), ];
const obj6 = { style: items7, children: null };
2026-07-23 10:11:24 +00:00
items7 = [tmp4.health, { height: first }];
2026-07-29 08:29:29 +00:00
const items8 = [closure_9(style, { style: tmp4.line }), memo1];
obj6[1] = items8;
items6[1] = closure_10(style, obj6);
obj2[1] = items6;
items4[1] = closure_10(style, obj2);
obj[1] = items4;
return closure_10(style, obj);
2026-07-20 16:05:17 +00:00
};