decord/source/modules/guild_antiraid/native/GuildRaidResolveActionSheet.tsx
github-actions 20a21ad13f chore: update source for alpha 346.5
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4791.js (118.4 MB)
2026-09-11 19:12:58 +00:00

145 lines
6.9 KiB
TypeScript

// Module ID: 11954
// Function ID: 11955
// Name: GuildRaidResolveActionSheet
// Dependencies: [32, 19, 17, 1074, 8485, 21, 4606, 576, 1114, 7591, 4573, 7270, 5629, 4602, 8684, 1178, 5026, 4786, 11925, 8490, 2]
// Exports: default
// Module 11954 (GuildRaidResolveActionSheet)
import nativeDefault from "native" /* 576 */;
import util from "util" /* 1114 */;
import ActionSheetActionCreatorsDefault from "ActionSheetActionCreators" /* 4573 */;
import Text_Text from "Text/Text" /* 4602 */;
import AppAnalyticsUtils from "AppAnalyticsUtils" /* 4786 */;
import components_Button_Button from "components/Button/Button" /* 5026 */;
import KeyboardAwareViewDefault from "KeyboardAwareView" /* 5629 */;
import ActionSheet from "ActionSheet" /* 7270 */;
import AutomodFeedback from "AutomodFeedback" /* 7591 */;
import SafetyToastsActionCreatorsDefault from "SafetyToastsActionCreators" /* 8490 */;
import GuildAntiRaidActionCreators from "GuildAntiRaidActionCreators" /* 11925 */;
import _slicedToArray from "module_32" /* 32 */;
import noop from "module_19" /* 19 */;
require = fn;
const View = fn(17).View;
const AnalyticEvents = fn(1074).AnalyticEvents;
const SafetyToastType = fn(8485).SafetyToastType;
const jsxProd = fn(21);
({ jsx: closure_8, jsxs: closure_9 } = jsxProd);
const createStyles = fn(4606);
let obj2 = { container: { paddingVertical: 24, paddingHorizontal: 16, display: "flex", flexDirection: "column", alignItems: "center" }, title: { marginBottom: 8, textAlign: "center" }, subtitle: { marginBottom: 16, textAlign: "center" }, optionContainer: { borderColor: nativeDefault.colors.BORDER_SUBTLE, borderWidth: 1, borderRadius: nativeDefault.radii.xs, display: "flex", flexDirection: "column", marginBottom: 14, width: "100%" }, option: { width: "100%" }, textInputContainer: { paddingLeft: 54, paddingRight: 16, paddingBottom: 16 }, textInput: null };
let obj3 = { borderColor: nativeDefault.colors.BORDER_SUBTLE, borderWidth: 1, borderRadius: nativeDefault.radii.xs, display: "flex", flexDirection: "column", marginBottom: 14, width: "100%" };
obj2.textInput = { backgroundColor: nativeDefault.colors.INPUT_BACKGROUND_DEFAULT, width: "100%", padding: 8, borderRadius: nativeDefault.radii.xs };
let closure_10 = createStyles.createStyles(obj2);
const size = fn(2);
const result = size.fileFinishedImporting("modules/guild_antiraid/native/GuildRaidResolveActionSheet.tsx");
export default function GuildRaidResolveActionSheet(arg0) {
({ guildId: require, messageId: importDefault } = arg0);
_slicedToArray = undefined;
noop = undefined;
c5 = undefined;
c6 = undefined;
function handleTextInputChange(arg0) {
_undefined3(arg0);
}
const tmp = closure_10();
dependencyMap = tmp;
[c3, c4] = noop.useState([]);
const tmp2 = _slicedToArray(noop.useState([]), 2);
[c5, c6] = noop.useState();
let obj = { text: null, value: null };
let intl = util.intl;
obj.text = intl.string(util.t.yeaXw5);
obj.value = AutomodFeedback.RaidResolutionType.LEGITIMATE_ACTIVITY;
let items = [obj, , , ];
let obj2 = { text: null, value: null };
const intl2 = util.intl;
obj2.text = intl2.string(util.t["o++3B8"]);
obj2.value = AutomodFeedback.RaidResolutionType.DM_SPAM;
items[1] = obj2;
let obj3 = { text: null, value: null };
const intl3 = util.intl;
obj3.text = intl3.string(util.t.UfHAwZ);
obj3.value = AutomodFeedback.RaidResolutionType.JOIN_RAID;
items[2] = obj3;
let obj4 = { text: null, value: null };
const intl4 = util.intl;
obj4.text = intl4.string(util.t.K3UWeR);
obj4.value = AutomodFeedback.RaidResolutionType.OTHER;
items[3] = obj4;
let obj5 = { children: null };
let obj6 = { style: tmp.container, children: null };
const tmp3 = _slicedToArray(noop.useState(), 2);
const obj7 = { style: tmp.title, variant: "heading-xl/bold", color: "mobile-text-heading-primary", children: null };
const intl5 = util.intl;
obj7.children = intl5.string(util.t["1zmw/H"]);
const items1 = [closure_8(Text_Text.Text, obj7), , , , ];
const obj8 = { style: tmp.subtitle, variant: "text-sm/normal", color: "text-default", children: null };
const intl6 = util.intl;
obj8.children = intl6.string(util.t.nF79oO);
items1[1] = closure_8(Text_Text.Text, obj8);
items1[2] = items.map((value) => {
value = value.value;
closure_0 = value;
const obj = { style: closure_2.optionContainer, children: null };
const obj2 = {
style: closure_2.option,
onPress() {
closure_0 = value;
c4(c3.includes(value) ? ((arr) => arr.filter((item) => item !== closure_1_0)) : ((arg0) => {
const items = [];
items[HermesBuiltin.arraySpread(arg0, 0)] = closure_0;
return items;
}));
},
leading: closure_1_8(guild_id(closure_2[15]).Checkbox, { selected: _undefined.includes(value) }),
label: value.text
};
let items = [closure_1_8(guild_id(closure_2[14]).FormRow, obj2), ];
let hasItem = value === guild_id(closure_2[9]).RaidResolutionType.OTHER;
if (hasItem) {
hasItem = _undefined.includes(tmp5(tmp6[9]).RaidResolutionType.OTHER);
}
if (hasItem) {
const obj5 = { style: tmp3.textInputContainer, children: null };
const obj6 = { style: tmp3.textInput, autoComplete: "off", value: _undefined2, placeholder: null, onChangeText: null };
const intl = tmp5(tmp6[8]).intl;
obj6.placeholder = intl.string(tmp5(tmp6[8]).t["PAM+JR"]);
obj6.onChangeText = handleTextInputChange;
obj5.children = tmp4(tmp5(tmp6[15]).TextInput, obj6);
hasItem = tmp4(tmp2, obj5);
}
items[1] = hasItem;
obj.children = items;
return closure_1_9(_undefined2, obj, value);
});
const obj9 = {
onPress() {
const obj = { raid_alert_type: AutomodFeedback.RaidAlertType.JOIN_RAID, raid_alert_id, false_alarm_type: _undefined.map((item) => item.toString()), false_alarm_other_reason: _undefined2, guild_id };
AppAnalyticsUtils.trackWithMetadata(AnalyticEvents.GUILD_RAID_FEEDBACK, obj);
const obj3 = GuildAntiRaidActionCreators;
obj3.handleResolveRaid(guild_id, raid_alert_id, AutomodFeedback.getMostImportantRaidResolutionType(_undefined));
ActionSheetActionCreatorsDefault.hideActionSheet("GuildRaidResolveActionSheet");
SafetyToastsActionCreatorsDefault.showSuccessToast(SafetyToastType.SAFETY_FEEDBACK_SUCCESS);
},
text: null,
size: "md"
};
const intl7 = util.intl;
obj9.text = intl7.string(util.t.Gh3A0O);
items1[3] = closure_8(components_Button_Button.Button, obj9);
const obj10 = {
onPress: function handleClose() {
raid_alert_id(closure_2[10]).hideActionSheet("GuildRaidResolveActionSheet");
},
text: null,
variant: "secondary",
size: "md"
};
const intl8 = util.intl;
obj10.text = intl8.string(util.t["ETE/oC"]);
items1[4] = closure_8(components_Button_Button.Button, obj10);
obj6.children = items1;
obj5.children = closure_9(KeyboardAwareViewDefault, obj6);
return closure_8(ActionSheet.ActionSheet, obj5);
};