Files
discord-decomp/sources/modules/safety_hub/native/AppealIngestionCollectSignal.tsx
T
2026-07-27 16:20:00 +03:00

124 lines
7.8 KiB
TypeScript

/* Metro module 11495; source: modules/safety_hub/native/AppealIngestionCollectSignal.tsx; dependencies: [31, 27, 5267, 33, 4501, 697, 3874, 7972, 5266, 11479, 694, 4080, 11496, 1962, 1244, 11489, 6766, 2] */
function _fun88066(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11681:6, offset: 0x01fd3850, size: 362 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
let value = require(5267) /* metro dependency 5267: SafetyHubConstants */;
const env0_4 = value.AppealIngestionSignal;
const env0_5 = value.AppealIngestionSignalOrder;
value = require(33) /* metro dependency 33 */;
const env0_6 = value.jsx;
const env0_7 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {container: {'flex': 1, 'paddingHorizontal': 16}};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.form = {marginBottom: 16, backgroundColor: BACKGROUND_BASE_LOW};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.formRow = {paddingVertical: 16, backgroundColor: BACKGROUND_BASE_LOWEST};
object2.formSection = {gap: 8};
object2.disclaimer = {marginTop: 24};
const env0_8 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/safety_hub/native/AppealIngestionCollectSignal.tsx');
exports.default = AppealIngestionCollectSignal;
}
function AppealSignalRadioRow({signal, selected, rowStyle, onSelect}) { // fn#88067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11681:482, offset: 0x01fd39ba, size: 254 bytes, params: 2, frame: 27
var object2;
const {accessibilityRole,
accessibilityState} = (require(3874) /* metro dependency 3874: useA11yRolesNative */).useRadioA11yNative({selected: selected});
const FormRow = (require(7972) /* metro dependency 7972: native */).FormRow;
object2 = {style: rowStyle};
const FormRow2 = (require(7972) /* metro dependency 7972: native */).FormRow;
const Label = FormRow2.Label;
object2.label = <Label text={(require(5266) /* metro dependency 5266: SafetyHubUtils */).getAppealSignalDisplayText(signal)} />;
object2.onPress = function() {
return onSelect(signal);
};
const FormRow3 = (require(7972) /* metro dependency 7972: native */).FormRow;
const Radio = FormRow3.Radio;
object2.trailing = <Radio selected={selected} />;
object2.accessibilityRole = accessibilityRole;
object2.accessibilityState = accessibilityState;
return <FormRow {...object2} />;
}
function AppealIngestionCollectSignal({isDsaEligible}) { // fn#88069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11681:969, offset: 0x01fd3ab8, size: 528 bytes, params: 2, frame: 30
const styles = useStyles();
const env0_2 = (require(11479) /* metro dependency 11479: useSafetyHubClassifications */).useSafetyHubAppealSignal();
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const value2 = Reflect.apply(string, intl, [(require(1244) /* metro dependency 1244: indexNative */).t['C5q+pW']]);
string = intl.string;
const VEcRhw = (require(1244) /* metro dependency 1244: indexNative */).t.VEcRhw;
const value3 = Reflect.apply(string, intl, [VEcRhw]);
const AppealIngestionModalScreen = (require(11489) /* metro dependency 11489: AppealIngestionModal */).AppealIngestionModalScreen;
const AppealIngestionModalHeader = (require(11489) /* metro dependency 11489: AppealIngestionModal */).AppealIngestionModalHeader;
const appealIngestionModalHeader = <AppealIngestionModalHeader headerText={value2} subHeaderText={value3} />;
const Form = (require(7972) /* metro dependency 7972: native */).Form;
const FormSection = (require(7972) /* metro dependency 7972: native */).FormSection;
const formSection = <FormSection sectionBodyStyle={styles.formSection} accessibilityRole="radiogroup">{AppealIngestionSignalOrder.map(_fun88073)}</FormSection>;
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
return (
<AppealIngestionModalScreen>
{appealIngestionModalHeader}
<View style={styles.container}>
<Form style={styles.form}>
{formSection}
<View style={styles.disclaimer}>
<TextWithIOSLinkWorkaround variant="text-sm/normal">
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t['8k9GCW'], {})}
</TextWithIOSLinkWorkaround>
</View>
</Form>
</View>
</AppealIngestionModalScreen>
);
}
function handleAppealSignalSelect(a0) { // fn#88070, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11681:1098, owner: AppealIngestionCollectSignal.handleAppealSignalSelect, offset: 0x01fd3cc8, size: 185 bytes, params: 2, frame: 18
var environment;
var defaultImport2;
var openLazy;
let value = environment.__proto__;
importDefault(dependencyMap[10]).dispatch({type: 'SAFETY_HUB_APPEAL_SIGNAL_SELECT', signal: a0});
if (isDsaEligible && a0 === AppealIngestionSignal.SOMETHING_ELSE) {
defaultImport2 = importDefault(dependencyMap[11]);
openLazy = defaultImport2.openLazy;
value = require(dependencyMap[13]);
value = value(dependencyMap[12], dependencyMap.paths);
Reflect.apply(openLazy, defaultImport2, [value, 'AppealIngestionFreeTextAppealReasonActionSheet',
{onSave: onSave,
onClose: onClose_88072}]);
}
}
function _fun88073(a0, a1) { // fn#88073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11681:1935, offset: 0x01fd3e03, size: 99 bytes, params: 3, frame: 16
const value = environment.__proto__;
return (
<AppealSignalRadioRow
signal={a0}
selected={a0 === env0_2}
rowStyle={styles.formRow}
onSelect={handleAppealSignalSelect}
key={'formrow-' + a1}
/>
);
}
function handleAppealSignalSelectOnSave(a0) { // fn#88071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11681:1295, owner: AppealIngestionCollectSignal.handleAppealSignalSelect.onSave, offset: 0x01fd3d81, size: 86 bytes, params: 2, frame: 15
const value = environment.__proto__.__proto__;
(importDefault(694) /* metro dependency 694: Dispatcher */).dispatch({type: 'SAFETY_HUB_APPEAL_SIGNAL_CUSTOM_INPUT_CHANGE',
userInput: a0});
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('AppealIngestionFreeTextAppealReasonActionSheet');
}
function handleAppealSignalSelectOnClose() { // fn#88072, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11681:1468, owner: AppealIngestionCollectSignal.handleAppealSignalSelect.onClose, offset: 0x01fd3dd7, size: 44 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__;
return (importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet('AppealIngestionFreeTextAppealReasonActionSheet');
}