92 lines
7.4 KiB
TypeScript
92 lines
7.4 KiB
TypeScript
/* Metro module 11497; source: modules/safety_hub/native/AppealIngestionConfirmSubmission.tsx; dependencies: [31, 27, 11473, 661, 33, 4501, 566, 11479, 1244, 11489, 11498, 5266, 4573, 4080, 11496, 1962, 694, 11492, 11493, 2] */
|
|
import Dispatcher from '../../../Dispatcher.tsx'; /* Metro dependency 694 */
|
|
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
|
|
import SafetyHubStore from '../SafetyHubStore.tsx'; /* Metro dependency 11473 */
|
|
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 FluxModule from '../../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as AppealIngestionModalModule from './AppealIngestionModal.tsx'; /* Metro dependency 11489 */
|
|
|
|
function _fun88078(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88078, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11683:6, offset: 0x01fd430a, size: 266 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
const env0_8 = (CreateStylesModule).createStyles({container: {'flex': 1,
|
|
'paddingHorizontal': 16}, detailsAction: {marginBottom: 16}});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/safety_hub/native/AppealIngestionConfirmSubmission.tsx');
|
|
exports.default = AppealIngestionConfirmSubmission;
|
|
function AppealIngestionConfirmSubmission({isDsaEligible}) { // fn#88079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11683:397, offset: 0x01fd4414, size: 821 bytes, params: 2, frame: 31
|
|
const styles = useStyles();
|
|
let useStateFromStores = FluxModule.useStateFromStores;
|
|
const value3 = (require(11479) /* metro dependency 11479: useSafetyHubClassifications */).useSafetyHubClassification(Reflect.apply(useStateFromStores,
|
|
FluxModule, [[SafetyHubStore], function() {
|
|
return SafetyHubStore.getAppealClassificationId();
|
|
}]) ?? EMPTY_STRING_SNOWFLAKE_ID);
|
|
useStateFromStores = FluxModule.useStateFromStores;
|
|
safetyHubStoreBinding = SafetyHubStore;
|
|
const appealSignal = Reflect.apply(useStateFromStores, FluxModule, [[safetyHubStoreBinding], function() {
|
|
return SafetyHubStore.getAppealSignal();
|
|
}]);
|
|
const freeTextAppealReason = FluxModule.useStateFromStores([safetyHubStoreBinding], function() {
|
|
return SafetyHubStore.getFreeTextAppealReason();
|
|
});
|
|
const r14 = value3.classification?.flagged_content ?? [];
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const value4 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['C5q+pW']);
|
|
const value5 = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['G2g/g5']);
|
|
const AppealIngestionModalScreen = (AppealIngestionModalModule).AppealIngestionModalScreen;
|
|
const AppealIngestionModalHeader = (AppealIngestionModalModule).AppealIngestionModalHeader;
|
|
const appealIngestionModalHeader = <AppealIngestionModalHeader headerText={value4} subHeaderText={value5} />;
|
|
const items3 = [
|
|
((Component) => <Component reasons={[(require(5266) /* metro dependency 5266: SafetyHubUtils */).getAppealSignalDisplayText(appealSignal),
|
|
freeTextAppealReason].filter(function(a0) {
|
|
return a0.length > 0;
|
|
})} />)(importDefault(11498) /* metro dependency 11498: AppealIngestionBreadcrumbs */),
|
|
];
|
|
items3[1] = isDsaEligible && ((Text) => <Text variant="heading-md/normal" color="text-link" style={styles.detailsAction} onPress={onPress_88084}>{freeTextAppealReason.length > 0 ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.tnE3bZ) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uoQFIp)}</Text>)((require(4573) /* metro dependency 4573: Text */).Text);
|
|
items3[2] = r14.length > 0 && ((Component) => <Component flaggedContent={r14} />)(importDefault(11492) /* metro dependency 11492: AppealIngestionActivitySummary */);
|
|
items3[3] = ((Component) => <Component classification={value3.classification} />)(importDefault(11493) /* metro dependency 11493: AppealIngestionPolicySummary */);
|
|
return (
|
|
<AppealIngestionModalScreen>
|
|
{appealIngestionModalHeader}
|
|
<View style={styles.container}>
|
|
{items3}
|
|
</View>
|
|
</AppealIngestionModalScreen>
|
|
);
|
|
function AppealIngestionConfirmSubmissionOnPress() { // fn#88084, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11683:1217, owner: AppealIngestionConfirmSubmission.onPress, offset: 0x01fd476f, size: 108 bytes, params: 1, frame: 17
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
const defaultImport = importDefault(dependencyMap[13]);
|
|
const openLazy = defaultImport.openLazy;
|
|
value = require(dependencyMap[15]);
|
|
value = value(dependencyMap[14], dependencyMap.paths);
|
|
return Reflect.apply(openLazy, defaultImport, [value, 'AppealIngestionFreeTextAppealReasonActionSheet',
|
|
{onSave: onSave_88085, onClose: onClose_88086}]);
|
|
function onPressOnSave_88085(a0) { // fn#88085, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11683:1320, owner: AppealIngestionConfirmSubmission.onPress.onSave, offset: 0x01fd47db, 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 onPressOnClose_88086() { // fn#88086, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11683:1493, owner: AppealIngestionConfirmSubmission.onPress.onClose, offset: 0x01fd4831, size: 44 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__.__proto__;
|
|
return (ActionSheetActionCreators).hideActionSheet('AppealIngestionFreeTextAppealReasonActionSheet');
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun88078, 11497, [31, 27, 11473, 661, 33, 4501, 566, 11479, 1244, 11489, 11498, 5266, 4573, 4080, 11496,
|
|
1962, 694, 11492, 11493,
|
|
2]) /* metro module 11497, dependencies: [31, 27, 11473, 661, 33, 4501, 566, 11479, 1244, 11489, 11498, 5266, 4573, 4080, 11496, 1962, 694, 11492, 11493, 2] */;
|