240 lines
14 KiB
TypeScript
240 lines
14 KiB
TypeScript
/* Metro module 11452; source: modules/guild_antiraid/native/GuildRaidResolveActionSheet.tsx; dependencies: [57, 31, 27, 661, 6263, 33, 4501, 697, 1244, 5061, 4080, 6805, 5467, 4573, 7972, 1305, 4578, 4863, 11447, 6264, 2] */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
|
|
import KeyboardAwareView from '../../keyboard/native/KeyboardAwareView.tsx'; /* Metro dependency 5467 */
|
|
import SafetyToastsActionCreatorsNative from '../../safety_common/SafetyToastsActionCreators.native.tsx'; /* Metro dependency 6264 */
|
|
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as ButtonNativeModule from '../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
|
|
import * as AppAnalyticsUtilsModule from '../../app_analytics/AppAnalyticsUtils.tsx'; /* Metro dependency 4863 */
|
|
import * as AutomodFeedbackModule from '../../guild_automod/AutomodFeedback.tsx'; /* Metro dependency 5061 */
|
|
import * as ConstantsModule2 from '../../safety_common/Constants.tsx'; /* Metro dependency 6263 */
|
|
import * as ActionSheetNativeModule from '../../../design/components/Sheet/native/ActionSheet.native.tsx'; /* Metro dependency 6805 */
|
|
import * as NativeModule from '../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
|
|
import * as GuildAntiRaidActionCreatorsModule from '../GuildAntiRaidActionCreators.tsx'; /* Metro dependency 11447 */
|
|
|
|
function _fun87679(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#87679, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11638:6, offset: 0x01fc793c, size: 494 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = JsxRuntimeModule;
|
|
const env0_8 = value.jsx;
|
|
const env0_9 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {container: {'paddingVertical': 24, 'paddingHorizontal': 16, 'display': 'flex', 'flexDirection': 'column',
|
|
'alignItems': 'center'}, title: {'marginBottom': 8, 'textAlign': 'center'}, subtitle: {'marginBottom': 16,
|
|
'textAlign': 'center'}};
|
|
const object2 = {'borderColor': null, 'borderWidth': 1, 'borderRadius': null, 'display': 'flex',
|
|
'flexDirection': 'column', 'marginBottom': 14, 'width': '100%'};
|
|
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
|
|
object2.borderColor = BORDER_SUBTLE;
|
|
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
|
object.optionContainer = object2;
|
|
object.option = {width: '100%'};
|
|
object.textInputContainer = {'paddingLeft': 54, 'paddingRight': 16, 'paddingBottom': 16};
|
|
const object4 = {'backgroundColor': null, 'width': '100%', 'padding': 8};
|
|
const INPUT_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INPUT_BACKGROUND_DEFAULT;
|
|
object4.backgroundColor = INPUT_BACKGROUND_DEFAULT;
|
|
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.xs;
|
|
object.textInput = object4;
|
|
const env0_10 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/guild_antiraid/native/GuildRaidResolveActionSheet.tsx');
|
|
exports.default = _default_87680;
|
|
function _default_87680({guildId, messageId}) { // fn#87680, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11638:824, offset: 0x01fc7b2a, size: 981 bytes, params: 2, frame: 29
|
|
const onPress_876822 = onPress_87682;
|
|
const styles = useStyles();
|
|
const binding = env0_4;
|
|
let useState = binding.useState;
|
|
const value2 = Reflect.apply(useState, binding, [[]]);
|
|
const binding2 = env0_3;
|
|
const value3 = binding2(value2, 2);
|
|
var env0_3 = value3[0];
|
|
var env0_4 = value3[1];
|
|
useState = binding.useState;
|
|
const value4 = binding2(Reflect.apply(useState, binding, []), 2);
|
|
const env0_5 = value4[0];
|
|
const env0_6 = value4[1];
|
|
let object = {};
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
object.text = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t.yeaXw5]);
|
|
const RaidResolutionType = (AutomodFeedbackModule).RaidResolutionType;
|
|
const LEGITIMATE_ACTIVITY = RaidResolutionType.LEGITIMATE_ACTIVITY;
|
|
object.value = LEGITIMATE_ACTIVITY;
|
|
const items3 = [object];
|
|
object = {};
|
|
object.text = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['o++3B8']);
|
|
const DM_SPAM = RaidResolutionType.DM_SPAM;
|
|
object.value = DM_SPAM;
|
|
items3[1] = object;
|
|
string = intl.string;
|
|
const UfHAwZ = (require(1244) /* metro dependency 1244: indexNative */).t.UfHAwZ;
|
|
const JOIN_RAID = RaidResolutionType.JOIN_RAID;
|
|
items3[2] = {text: Reflect.apply(string, intl, [UfHAwZ]), value: JOIN_RAID};
|
|
string = intl.string;
|
|
const K3UWeR = (require(1244) /* metro dependency 1244: indexNative */).t.K3UWeR;
|
|
const OTHER = RaidResolutionType.OTHER;
|
|
items3[3] = {text: Reflect.apply(string, intl, [K3UWeR]), value: OTHER};
|
|
const ActionSheet = (ActionSheetNativeModule).ActionSheet;
|
|
const Text = (TextModule).Text;
|
|
const items2 = [
|
|
<Text
|
|
style={styles.title}
|
|
variant="heading-xl/bold"
|
|
color="mobile-text-heading-primary"
|
|
>
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['1zmw/H'])}
|
|
</Text>,
|
|
];
|
|
items2[1] = (
|
|
<Text
|
|
style={styles.subtitle}
|
|
variant="text-sm/normal"
|
|
color="text-default"
|
|
>
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.nF79oO)}
|
|
</Text>
|
|
);
|
|
items2[2] = items3.map(_fun87683);
|
|
const Button = (ButtonNativeModule).Button;
|
|
const object4 = {onPress: onPress_87689};
|
|
string = intl.string;
|
|
const Gh3A0O = (require(1244) /* metro dependency 1244: indexNative */).t.Gh3A0O;
|
|
object4.text = Reflect.apply(string, intl, [Gh3A0O]);
|
|
object4.size = 'md';
|
|
items2[3] = <Button {...object4} />;
|
|
items2[4] = (
|
|
<Button
|
|
onPress={onPress_876822}
|
|
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])}
|
|
variant="secondary"
|
|
size="md"
|
|
/>
|
|
);
|
|
return (
|
|
<ActionSheet>
|
|
{((Component) => <Component style={styles.container}>{items2}</Component>)(KeyboardAwareView)}
|
|
</ActionSheet>
|
|
);
|
|
function handleTextInputChange(a0) { // fn#87681, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11638:1303, owner: _default_87680.handleTextInputChange, offset: 0x01fc7eff, size: 19 bytes, params: 2, frame: 11
|
|
env0_6(a0);
|
|
}
|
|
|
|
function _default_87680OnPress() { // fn#87682, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11638:1342, owner: _default_87680.onPress, offset: 0x01fc7f12, size: 44 bytes, params: 1, frame: 12
|
|
const value = environment.__proto__;
|
|
(ActionSheetActionCreators).hideActionSheet('GuildRaidResolveActionSheet');
|
|
}
|
|
|
|
function _fun87683({text, value}) { // fn#87683, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11638:1782, offset: 0x01fc7f3e, size: 422 bytes, params: 2, frame: 28
|
|
var object2;
|
|
var TextInput;
|
|
var intl;
|
|
let stylesBinding = styles;
|
|
const optionContainer = stylesBinding.optionContainer;
|
|
const FormRow = (NativeModule).FormRow;
|
|
const option = stylesBinding.option;
|
|
const Checkbox = (require(1305) /* metro dependency 1305: native */).Checkbox;
|
|
const formRow = (
|
|
<FormRow
|
|
style={option}
|
|
onPress={function() {
|
|
_fun87685(value);
|
|
}}
|
|
leading={<Checkbox selected={env0_3.includes(value)} />}
|
|
label={text}
|
|
/>
|
|
);
|
|
const RaidResolutionType = (require(5061) /* metro dependency 5061: AutomodFeedback */).RaidResolutionType;
|
|
const OTHER = RaidResolutionType.OTHER;
|
|
let r6 = value === OTHER && env0_3.includes((require(5061) /* metro dependency 5061: AutomodFeedback */).RaidResolutionType.OTHER);
|
|
if (r6) {
|
|
object2 = {};
|
|
stylesBinding = styles;
|
|
object2.style = stylesBinding.textInputContainer;
|
|
TextInput = (require(1305) /* metro dependency 1305: native */).TextInput;
|
|
var textInputProps = {style: stylesBinding.textInput, autoComplete: 'off', value: env0_5};
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
textInputProps.placeholder = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['PAM+JR']);
|
|
textInputProps.onChangeText = handleTextInputChange;
|
|
r6 = (
|
|
<View {...object2}>
|
|
<TextInput {...textInputProps} />
|
|
</View>
|
|
);
|
|
}
|
|
return (
|
|
<View style={optionContainer} key={value}>
|
|
{formRow}
|
|
{r6}
|
|
</View>
|
|
);
|
|
function onPress_87684() { // fn#87684, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11638:1884, offset: 0x01fc80e4, size: 25 bytes, params: 1, frame: 11
|
|
onPress_87684OnCheckboxChange(value);
|
|
function onPress_87684OnCheckboxChange(a0) { // fn#87685, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11638:1888, owner: onPress_87684.onCheckboxChange, offset: 0x01fc80fd, size: 58 bytes, params: 2, frame: 13
|
|
const env0_0 = a0;
|
|
env2_4(env2_3.includes(a0) ? function(a0) {
|
|
return a0.filter(_fun87687);
|
|
} : _fun87688);
|
|
function _fun87686(a0) { // fn#87686, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11638:1941, offset: 0x01fc8137, size: 24 bytes, params: 2, frame: 11
|
|
return a0.filter(_fun87687);
|
|
function _fun87687(a0) { // fn#87687, offset: 0x01379260, size: 16 bytes, params: 2, frame: 2
|
|
return a0 !== env1_0;
|
|
}
|
|
|
|
}
|
|
|
|
function _fun87688(a0) { // fn#87688, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11638:1965, offset: 0x01bd074a, size: 37 bytes, params: 2, frame: 13
|
|
const items2 = [];
|
|
const value = arraySpread(items2, a0, 0, undefined);
|
|
items2[value] = env0_0;
|
|
value + 1;
|
|
return items2;
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function _default_87680OnPress_87689() { // fn#87689, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11638:2364, owner: _default_87680.onPress, offset: 0x01fc814f, size: 231 bytes, params: 1, frame: 23
|
|
const object = {};
|
|
const RaidAlertType = (AutomodFeedbackModule).RaidAlertType;
|
|
const JOIN_RAID = RaidAlertType.JOIN_RAID;
|
|
object.raid_alert_type = JOIN_RAID;
|
|
const messageIdBinding = messageId;
|
|
object.raid_alert_id = messageIdBinding;
|
|
const binding = env0_3;
|
|
object.false_alarm_type = binding.map(function(a0) {
|
|
return a0.toString();
|
|
});
|
|
object.false_alarm_other_reason = env0_5;
|
|
const guildIdBinding = guildId;
|
|
object.guild_id = guildIdBinding;
|
|
const trackWithMetadata = AppAnalyticsUtilsModule.trackWithMetadata;
|
|
const GUILD_RAID_FEEDBACK = AnalyticEvents.GUILD_RAID_FEEDBACK;
|
|
Reflect.apply(trackWithMetadata, AppAnalyticsUtilsModule, [GUILD_RAID_FEEDBACK, object]);
|
|
const handleResolveRaid = GuildAntiRaidActionCreatorsModule.handleResolveRaid;
|
|
const getMostImportantRaidResolutionType = AutomodFeedbackModule.getMostImportantRaidResolutionType;
|
|
Reflect.apply(handleResolveRaid, GuildAntiRaidActionCreatorsModule, [guildIdBinding, messageIdBinding,
|
|
Reflect.apply(getMostImportantRaidResolutionType, AutomodFeedbackModule, [binding])]);
|
|
onPress_87682();
|
|
const defaultImport = SafetyToastsActionCreatorsNative;
|
|
const showSuccessToast = defaultImport.showSuccessToast;
|
|
const SAFETY_FEEDBACK_SUCCESS = SafetyToastType.SAFETY_FEEDBACK_SUCCESS;
|
|
Reflect.apply(showSuccessToast, defaultImport, [SAFETY_FEEDBACK_SUCCESS]);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun87679, 11452, [57, 31, 27, 661, 6263, 33, 4501, 697, 1244, 5061, 4080, 6805, 5467, 4573, 7972, 1305,
|
|
4578, 4863, 11447, 6264,
|
|
2]) /* metro module 11452, dependencies: [57, 31, 27, 661, 6263, 33, 4501, 697, 1244, 5061, 4080, 6805, 5467, 4573, 7972, 1305, 4578, 4863, 11447, 6264, 2] */;
|