Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4791.js (118.4 MB)
165 lines
6.9 KiB
TypeScript
165 lines
6.9 KiB
TypeScript
// Module ID: 11963
|
|
// Function ID: 11964
|
|
// Name: AutomodUserProfileQuarantineAlert
|
|
// Dependencies: [32, 109, 19, 17, 502, 2021, 1979, 11956, 1074, 4232, 21, 4606, 576, 5045, 1114, 1178, 11964, 4602, 11965, 7455, 563, 4251, 5043, 1242, 2]
|
|
// Exports: default
|
|
|
|
// Module 11963 (AutomodUserProfileQuarantineAlert)
|
|
import nativeDefault from "native" /* 576 */;
|
|
import util from "util" /* 1114 */;
|
|
import native from "native" /* 1178 */;
|
|
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1242 */;
|
|
import AutomodPermissionUtils from "AutomodPermissionUtils" /* 4251 */;
|
|
import Text_Text from "Text/Text" /* 4602 */;
|
|
import common_AlertDefault from "common/Alert" /* 5045 */;
|
|
import openUserSettings from "openUserSettings" /* 7455 */;
|
|
import _modDef11964 from "module_11964" /* 11964 */;
|
|
import _slicedToArray from "module_32" /* 32 */;
|
|
import _objectWithoutProperties from "_objectWithoutProperties" /* 109 */;
|
|
import noop from "module_19" /* 19 */;
|
|
import AuthenticationStore from "AuthenticationStore" /* 502 */;
|
|
import GuildMemberStore from "GuildMemberStore" /* 2021 */;
|
|
import GuildStore from "GuildStore" /* 1979 */;
|
|
|
|
require = fn;
|
|
function ChatBlockedAlert(arg0) {
|
|
({ title, description, buttonCta, onConfirm } = arg0);
|
|
const tmp = _objectWithoutProperties(arg0, closure_3);
|
|
const tmp2 = closure_18();
|
|
const obj = {};
|
|
const merged = Object.assign(tmp);
|
|
obj.style = tmp2.wrapper;
|
|
const intl = util.intl;
|
|
obj.cancelText = intl.string(util.t["ETE/oC"]);
|
|
let onClose;
|
|
if (tmp != null) {
|
|
onClose = tmp.onClose;
|
|
}
|
|
obj.onCancel = onClose;
|
|
obj.confirmText = buttonCta;
|
|
obj.onConfirm = onConfirm;
|
|
const obj2 = { style: tmp2.body, children: null };
|
|
const tmp6 = common_AlertDefault;
|
|
const items = [value2(native.Icon, { source: _modDef11964, size: native.Icon.Sizes.CUSTOM, style: tmp2.mainIcon }), value2(Text_Text.Text, { style: tmp2.title, accessibilityRole: "header", variant: "heading-md/medium", color: "mobile-text-heading-primary", children: title }), value2(Text_Text.Text, { style: tmp2.description, variant: "text-sm/medium", color: "text-default", children: description })];
|
|
obj2.children = items;
|
|
obj.children = closure_1_17(View, obj2);
|
|
return value2(tmp6, obj);
|
|
}
|
|
function PerServerProfileAlert(arg0) {
|
|
({ guildId, guildName, automodReason } = arg0);
|
|
if (automodReason === GuildMemberFlags.AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME) {
|
|
const intl2 = util.intl;
|
|
let stringResult = intl2.string(util.t.SpDXI7);
|
|
let tmp2 = require;
|
|
} else {
|
|
tmp2 = require;
|
|
const intl = util.intl;
|
|
stringResult = intl.string(util.t.TBeZmG);
|
|
}
|
|
const tmp = _objectWithoutProperties(arg0, closure_4);
|
|
const tmp2Result = tmp2(11965);
|
|
[require, tmp8] = tmp2(11965).useOpenFixQuarantinedProfileModal({ guildId });
|
|
if (!tmp8) {
|
|
const intl3 = tmp2(1114).intl;
|
|
stringResult = intl3.string(tmp2(1114).t.FFj5Dt);
|
|
}
|
|
const intl4 = tmp2(1114).intl;
|
|
const string = intl4.string;
|
|
const t = tmp2(1114).t;
|
|
if (tmp8) {
|
|
let stringResult1 = string(t["/PGQf0"]);
|
|
} else {
|
|
stringResult1 = string(t.WikgZ1);
|
|
}
|
|
const obj = {};
|
|
const merged = Object.assign(tmp);
|
|
const intl5 = tmp2(1114).intl;
|
|
obj.title = intl5.format(tmp2(1114).t.kcYdTq, { guildName });
|
|
obj.description = stringResult;
|
|
obj.buttonCta = stringResult1;
|
|
obj.onConfirm = function onConfirm() {
|
|
require();
|
|
};
|
|
return value2(ChatBlockedAlert, obj);
|
|
}
|
|
function ServerTagAlert(guildName) {
|
|
const obj = {};
|
|
const merged = Object.assign(_objectWithoutProperties(guildName, closure_5));
|
|
const intl = util.intl;
|
|
obj.title = intl.format(util.t.c8TwbL, { guildName: guildName.guildName });
|
|
const intl2 = util.intl;
|
|
obj.description = intl2.string(util.t.EJJLHp);
|
|
const intl3 = util.intl;
|
|
obj.buttonCta = intl3.string(util.t.Viksoo);
|
|
obj.onConfirm = function onConfirm() {
|
|
openUserSettings.openUserSettings({ screen: constants.PROFILE_CUSTOMIZATION });
|
|
};
|
|
return value2(ChatBlockedAlert, obj);
|
|
}
|
|
let closure_3 = ["title", "description", "buttonCta", "onConfirm"];
|
|
let closure_4 = ["guildId", "guildName", "automodReason"];
|
|
let closure_5 = ["guildName"];
|
|
const View = fn(17).View;
|
|
const QUARANTINE_USER_ALERT_KEY = fn(11956).QUARANTINE_USER_ALERT_KEY;
|
|
const Constants = fn(1074);
|
|
({ AnalyticEvents: map1, UserSettingsSections: closure_14 } = Constants);
|
|
const GuildMemberFlags = fn(4232).GuildMemberFlags;
|
|
const jsxProd = fn(21);
|
|
({ jsx: closure_16, jsxs: closure_17 } = jsxProd);
|
|
const createStyles = fn(4606);
|
|
let obj2 = { wrapper: { padding: 16 }, body: { flexDirection: "column", alignItems: "center" }, mainIcon: null, title: null, description: null };
|
|
let size = { width: 48, height: 48, tintColor: nativeDefault.colors.TEXT_FEEDBACK_CRITICAL, marginBottom: 16 };
|
|
obj2.mainIcon = size;
|
|
obj2.title = { marginBottom: 16, textAlign: "center" };
|
|
obj2.description = { textAlign: "center" };
|
|
let closure_18 = createStyles.createStyles(obj2);
|
|
size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/guild_automod/native/AutomodUserProfileQuarantineAlert.tsx");
|
|
|
|
export default function AutomodUserProfileQuarantineAlert(guildId) {
|
|
guildId = guildId.guildId;
|
|
const items = [AuthenticationStore];
|
|
const stateFromStores = guildId(563).useStateFromStores(items, () => id.getId());
|
|
let obj = guildId(563);
|
|
const tmp = guildId;
|
|
const items1 = [GuildStore];
|
|
const items2 = [guildId];
|
|
const stateFromStores1 = guildId(563).useStateFromStores(items1, () => GuildStore.getGuild(guildId), items2);
|
|
let str;
|
|
if (stateFromStores1 != null) {
|
|
str = stateFromStores1.name;
|
|
}
|
|
if (str == null) {
|
|
str = "";
|
|
}
|
|
const obj2 = guildId(563);
|
|
const items3 = [GuildMemberStore];
|
|
const items4 = [guildId, stateFromStores];
|
|
const stateFromStores2 = tmp(563).useStateFromStores(items3, () => {
|
|
if (null == guildId) {
|
|
return null;
|
|
} else {
|
|
const automodQuarantinedGuildMemberFlags = AutomodPermissionUtils.getAutomodQuarantinedGuildMemberFlags(GuildMemberStore.getMember(tmp, stateFromStores));
|
|
return AutomodPermissionUtils.getAutomodReason(automodQuarantinedGuildMemberFlags);
|
|
}
|
|
}, items4);
|
|
stateFromStores(5043)(() => {
|
|
AnalyticsUtilsDefault.track(constants.OPEN_MODAL, { type: QUARANTINE_USER_ALERT_KEY, guild_id: guildId, other_user_id: stateFromStores });
|
|
});
|
|
if (stateFromStores2 !== GuildMemberFlags.AUTOMOD_QUARANTINED_BIO) {
|
|
if (stateFromStores2 !== tmp7.AUTOMOD_QUARANTINED_USERNAME_OR_GUILD_NICKNAME) {
|
|
if (stateFromStores2 === tmp7.AUTOMOD_QUARANTINED_SERVER_TAG) {
|
|
const obj3 = { guildName: str };
|
|
const merged = Object.assign(guildId);
|
|
let tmp13 = closure_16(ServerTagAlert, obj3);
|
|
} else {
|
|
const obj4 = { automodReason: stateFromStores2, guildName: str };
|
|
const merged1 = Object.assign(guildId);
|
|
tmp13 = closure_16(PerServerProfileAlert, obj4);
|
|
}
|
|
}
|
|
return tmp13;
|
|
}
|
|
const merged2 = Object.assign(guildId);
|
|
tmp13 = closure_16(PerServerProfileAlert, { automodReason: stateFromStores2, guildName: str });
|
|
};
|