Files
2026-07-28 01:06:53 +03:00

143 lines
9.2 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] */
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as UseA11yRolesNativeModule from '../../../external/discord_common/js/packages/design/hooks/useA11yRolesNative.tsx'; /* Metro dependency 3874 */
import * as SafetyHubConstantsModule from '../SafetyHubConstants.tsx'; /* Metro dependency 5267 */
import * as TextWithIOSLinkWorkaroundModule from '../../a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */
import * as NativeModule from '../../../design/void/Form/native/index.tsx'; /* Metro dependency 7972 */
import * as UseSafetyHubClassificationsModule from '../hooks/useSafetyHubClassifications.tsx'; /* Metro dependency 11479 */
import * as AppealIngestionModalModule from './AppealIngestionModal.tsx'; /* Metro dependency 11489 */
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
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
ReactModule;
let value = SafetyHubConstantsModule;
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;
object = {container: {'flex': 1, 'paddingHorizontal': 16}};
const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW;
object.form = {marginBottom: 16, backgroundColor: BACKGROUND_BASE_LOW};
const BACKGROUND_BASE_LOWEST = (Native).colors.BACKGROUND_BASE_LOWEST;
object.formRow = {paddingVertical: 16, backgroundColor: BACKGROUND_BASE_LOWEST};
object.formSection = {gap: 8};
object.disclaimer = {marginTop: 24};
const env0_8 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).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
const {accessibilityRole,
accessibilityState} = (UseA11yRolesNativeModule).useRadioA11yNative({selected: selected});
const FormRow = (NativeModule).FormRow;
object = {style: rowStyle};
const FormRow2 = (NativeModule).FormRow;
const Label = FormRow2.Label;
object.label = (
<Label text={(require(5266) /* metro dependency 5266: SafetyHubUtils */).getAppealSignalDisplayText(signal)} />
);
object.onPress = function() {
return onSelect(signal);
};
const FormRow3 = (NativeModule).FormRow;
const Radio = FormRow3.Radio;
object.trailing = <Radio selected={selected} />;
object.accessibilityRole = accessibilityRole;
object.accessibilityState = accessibilityState;
return <FormRow {...object} />;
}
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 = (UseSafetyHubClassificationsModule).useSafetyHubAppealSignal();
const intl = (IndexNativeModule).intl;
let string = intl.string;
const value2 = Reflect.apply(string, intl, [(IndexNativeModule).t['C5q+pW']]);
string = intl.string;
const VEcRhw = (IndexNativeModule).t.VEcRhw;
const value3 = Reflect.apply(string, intl, [VEcRhw]);
const AppealIngestionModalScreen = (AppealIngestionModalModule).AppealIngestionModalScreen;
const AppealIngestionModalHeader = (AppealIngestionModalModule).AppealIngestionModalHeader;
const appealIngestionModalHeader = <AppealIngestionModalHeader headerText={value2} subHeaderText={value3} />;
const Form = (NativeModule).Form;
const FormSection = (NativeModule).FormSection;
const formSection = (
<FormSection sectionBodyStyle={styles.formSection} accessibilityRole="radiogroup">
{AppealIngestionSignalOrder.map(_fun88073)}
</FormSection>
);
const TextWithIOSLinkWorkaround = (TextWithIOSLinkWorkaroundModule).TextWithIOSLinkWorkaround;
return (
<AppealIngestionModalScreen>
{appealIngestionModalHeader}
<View style={styles.container}>
<Form style={styles.form}>
{formSection}
<View style={styles.disclaimer}>
<TextWithIOSLinkWorkaround variant="text-sm/normal">
{intl.format((IndexNativeModule).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_88071, onClose: onClose_88072}]);
}
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__;
(Dispatcher).dispatch({type: 'SAFETY_HUB_APPEAL_SIGNAL_CUSTOM_INPUT_CHANGE',
userInput: a0});
(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 (ActionSheetActionCreators).hideActionSheet('AppealIngestionFreeTextAppealReasonActionSheet');
}
}
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}
/>
);
}
}
}
global.__d(_fun88066, 11495, [31, 27, 5267, 33, 4501, 697, 3874, 7972, 5266, 11479, 694, 4080, 11496, 1962, 1244,
11489, 6766,
2]) /* metro module 11495, dependencies: [31, 27, 5267, 33, 4501, 697, 3874, 7972, 5266, 11479, 694, 4080, 11496, 1962, 1244, 11489, 6766, 2] */;