decord/source/modules/guild_automod/native/AutomodUserProfileQuarantineAlert.tsx

171 lines
7 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 11430
// Function ID: 11431
2026-07-20 16:05:17 +00:00
// Name: ChatBlockedAlert
2026-08-25 06:04:03 +00:00
// Dependencies: [32, 109, 19, 17, 1218, 1992, 1910, 11423, 676, 4013, 21, 4380, 712, 4833, 1236, 1297, 11431, 4376, 11432, 6125, 647, 4031, 4831, 698, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-25 06:04:03 +00:00
// Module 11430 (ChatBlockedAlert)
2026-08-24 06:08:38 +00:00
import noopAll from "noop" /* 19 */;
import ThemesDefault from "Themes" /* 712 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
import Button from "Button" /* 1297 */;
2026-08-25 06:04:03 +00:00
import Text from "Text" /* 4376 */;
import componentDidMountDefault from "componentDidMount" /* 4833 */;
import registerAssetDefault from "registerAsset" /* 11431 */;
2026-08-24 06:08:38 +00:00
import closure_6 from "_slicedToArray" /* 32 */;
import closure_7 from "_objectWithoutProperties" /* 109 */;
import { View } from "get ActivityIndicator" /* 17 */;
import closure_9 from "fetchFingerprint" /* 1218 */;
2026-08-25 06:04:03 +00:00
import closure_10 from "trackCommunicationDisabled" /* 1992 */;
2026-08-24 06:08:38 +00:00
import closure_11 from "createGuildRecordFromRust" /* 1910 */;
2026-08-25 06:04:03 +00:00
import { QUARANTINE_USER_ALERT_KEY } from "AutomodEventType" /* 11423 */;
2026-08-24 06:08:38 +00:00
import ME from "ME" /* 676 */;
2026-08-25 06:04:03 +00:00
import { GuildMemberFlags } from "GuildMemberFlags" /* 4013 */;
2026-08-24 06:08:38 +00:00
import jsxProd from "jsxProd" /* 21 */;
2026-08-25 06:04:03 +00:00
import createCacheKey from "createCacheKey" /* 4380 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function ChatBlockedAlert(arg0) {
({ title, description, buttonCta, onConfirm } = arg0);
2026-07-23 10:11:24 +00:00
const tmp = callback2(arg0, closure_3);
2026-08-24 06:08:38 +00:00
const tmp2 = callback5();
2026-07-20 16:05:17 +00:00
let obj = {};
const merged = Object.assign(tmp);
2026-07-29 08:29:29 +00:00
obj.style = tmp2.wrapper;
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
obj.cancelText = intl.string(getSystemLocale.t["ETE/oC"]);
2026-07-20 16:05:17 +00:00
let onClose;
2026-07-29 08:29:29 +00:00
if (tmp != null) {
2026-07-20 16:05:17 +00:00
onClose = tmp.onClose;
}
2026-07-29 08:29:29 +00:00
obj.onCancel = onClose;
obj.confirmText = buttonCta;
obj.onConfirm = onConfirm;
obj = { style: tmp2.body, children: null };
2026-08-24 06:08:38 +00:00
obj = { source: registerAssetDefault, size: tmp8(1297).Icon.Sizes.CUSTOM, style: tmp2.mainIcon };
const items = [closure_16(Button.Icon, obj), closure_16(Text.Text, { style: tmp2.title, accessibilityRole: "header", variant: "heading-md/medium", color: "mobile-text-heading-primary", children: title }), closure_16(Text.Text, { style: tmp2.description, variant: "text-sm/medium", color: "text-default", children: description })];
2026-07-29 08:29:29 +00:00
obj[1] = items;
obj.children = callback4(View, obj);
2026-08-24 06:08:38 +00:00
return closure_16(componentDidMountDefault, obj);
2026-07-20 16:05:17 +00:00
}
function PerServerProfileAlert(arg0) {
({ guildId, guildName, automodReason } = arg0);
if (automodReason === GuildMemberFlags.AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME) {
2026-08-24 06:08:38 +00:00
const intl2 = getSystemLocale.intl;
let stringResult = intl2.string(getSystemLocale.t.SpDXI7);
2026-07-29 08:29:29 +00:00
let tmp2 = require;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
tmp2 = require;
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
stringResult = intl.string(getSystemLocale.t.TBeZmG);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const tmp = callback2(arg0, closure_4);
2026-08-25 06:04:03 +00:00
const tmp2Result = tmp2(11432);
[require, tmp8] = callback(tmp2(11432).useOpenFixQuarantinedProfileModal({ guildId }), 2);
2026-07-29 08:29:29 +00:00
if (!tmp8) {
const intl3 = tmp2(1236).intl;
stringResult = intl3.string(tmp2(1236).t.FFj5Dt);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const intl4 = tmp2(1236).intl;
2026-07-20 16:05:17 +00:00
const string = intl4.string;
2026-07-29 08:29:29 +00:00
const t = tmp2(1236).t;
if (tmp8) {
2026-07-23 10:11:24 +00:00
let stringResult1 = string(t["/PGQf0"]);
2026-07-20 16:05:17 +00:00
} else {
stringResult1 = string(t.WikgZ1);
}
2026-07-29 08:29:29 +00:00
const obj = {};
const merged = Object.assign(tmp);
const intl5 = tmp2(1236).intl;
obj.title = intl5.format(tmp2(1236).t.kcYdTq, { guildName });
obj.description = stringResult;
obj.buttonCta = stringResult1;
obj.onConfirm = function onConfirm() {
2026-07-20 16:05:17 +00:00
callback();
};
2026-07-23 10:11:24 +00:00
return callback3(ChatBlockedAlert, obj);
2026-07-20 16:05:17 +00:00
}
function ServerTagAlert(guildName) {
2026-07-23 10:11:24 +00:00
let obj = {};
const merged = Object.assign(callback2(guildName, closure_5));
2026-08-24 06:08:38 +00:00
const intl = getSystemLocale.intl;
obj.title = intl.format(getSystemLocale.t.c8TwbL, { guildName: guildName.guildName });
const intl2 = getSystemLocale.intl;
obj.description = intl2.string(getSystemLocale.t.EJJLHp);
const intl3 = getSystemLocale.intl;
obj.buttonCta = intl3.string(getSystemLocale.t.Viksoo);
2026-07-29 08:29:29 +00:00
obj.onConfirm = function onConfirm() {
let obj = callback(table[19]);
obj = { screen: constants.PROFILE_CUSTOMIZATION };
2026-07-20 16:05:17 +00:00
obj.openUserSettings(obj);
};
2026-07-23 10:11:24 +00:00
return callback3(ChatBlockedAlert, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let closure_3 = ["title", "description", "buttonCta", "onConfirm"];
let closure_4 = ["guildId", "guildName", "automodReason"];
let closure_5 = ["guildName"];
2026-08-24 06:08:38 +00:00
noopAll;
2026-07-29 08:29:29 +00:00
({ AnalyticEvents: map1, UserSettingsSections: closure_14 } = ME);
2026-07-23 10:11:24 +00:00
({ jsx: closure_16, jsxs: closure_17 } = jsxProd);
2026-07-29 08:29:29 +00:00
createCacheKey = { wrapper: { padding: 16 }, body: { flexDirection: "column", alignItems: "center" }, mainIcon: null, title: null, description: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { width: 48, height: 48, tintColor: ThemesDefault.colors.TEXT_FEEDBACK_CRITICAL, marginBottom: 16 };
2026-07-29 08:29:29 +00:00
createCacheKey[2] = createCacheKey;
createCacheKey[3] = { marginBottom: 16, textAlign: "center" };
createCacheKey[4] = { textAlign: "center" };
2026-08-24 06:08:38 +00:00
let closure_18 = createCacheKey.createStyles(createCacheKey);
const result = require("set").fileFinishedImporting("modules/guild_automod/native/AutomodUserProfileQuarantineAlert.tsx");
2026-07-20 16:05:17 +00:00
export default function AutomodUserProfileQuarantineAlert(guildId) {
guildId = guildId.guildId;
2026-07-29 08:29:29 +00:00
let obj = guildId(647);
2026-08-24 06:08:38 +00:00
const items = [closure_9];
2026-07-29 08:29:29 +00:00
const stateFromStores = obj.useStateFromStores(items, () => id.getId());
2026-08-24 06:08:38 +00:00
obj1 = guildId(647);
const items1 = [closure_11];
2026-07-20 16:05:17 +00:00
const items2 = [guildId];
2026-08-24 06:08:38 +00:00
const stateFromStores1 = obj1.useStateFromStores(items1, () => closure_1_11.getGuild(guildId), items2);
2026-07-29 08:29:29 +00:00
let str;
if (stateFromStores1 != null) {
str = stateFromStores1.name;
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-08-24 06:08:38 +00:00
const items3 = [closure_10];
2026-07-20 16:05:17 +00:00
const items4 = [guildId, stateFromStores];
2026-07-29 08:29:29 +00:00
const stateFromStores2 = guildId(647).useStateFromStores(items3, () => {
2026-07-20 16:05:17 +00:00
if (null == guildId) {
return null;
} else {
2026-08-24 06:08:38 +00:00
const automodQuarantinedGuildMemberFlags = guildId(closure_1_2[21]).getAutomodQuarantinedGuildMemberFlags(closure_1_10.getMember(tmp, stateFromStores));
const obj = guildId(closure_1_2[21]);
return guildId(closure_1_2[21]).getAutomodReason(automodQuarantinedGuildMemberFlags);
2026-07-20 16:05:17 +00:00
}
}, items4);
2026-08-25 06:04:03 +00:00
stateFromStores(4831)(() => {
2026-08-24 06:08:38 +00:00
let obj = stateFromStores(closure_1_2[23]);
obj = { type: closure_1_12, guild_id: guildId, other_user_id: stateFromStores };
obj.track(closure_1_13.OPEN_MODAL, obj);
2026-07-20 16:05:17 +00:00
});
if (stateFromStores2 !== GuildMemberFlags.AUTOMOD_QUARANTINED_BIO) {
2026-07-29 08:29:29 +00:00
if (stateFromStores2 !== tmp7.AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME) {
if (stateFromStores2 === tmp7.AUTOMOD_QUARANTINED_SERVER_TAG) {
obj = { guildName: null };
obj[0] = str;
2026-07-20 16:05:17 +00:00
const merged = Object.assign(guildId);
2026-07-23 10:11:24 +00:00
let tmp13 = callback3(ServerTagAlert, obj);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
obj = { automodReason: null, guildName: null };
obj[0] = stateFromStores2;
obj[1] = str;
2026-07-20 16:05:17 +00:00
const merged1 = Object.assign(guildId);
2026-07-23 10:11:24 +00:00
tmp13 = callback3(PerServerProfileAlert, obj);
2026-07-20 16:05:17 +00:00
}
}
return tmp13;
}
obj1 = { automodReason: stateFromStores2, guildName: str };
const merged2 = Object.assign(guildId);
2026-07-23 10:11:24 +00:00
tmp13 = callback3(PerServerProfileAlert, obj1);
2026-07-20 16:05:17 +00:00
};