/* Metro module 11489; source: modules/safety_hub/native/AppealIngestionModal.tsx; dependencies: [5, 57, 31, 27, 11473, 5267, 661, 33, 4501, 697, 4573, 566, 11479, 1484, 5268, 11488, 11480, 5266, 6618, 1244, 4578, 5282, 11490, 480, 11495, 11497, 11499, 11501, 11502, 6518, 5280, 2] */ import Module00005 from '../../../by-id/module-00005.js'; /* Metro dependency 5 */ import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */ import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */ import SafetyHubStore from '../SafetyHubStore.tsx'; /* Metro dependency 11473 */ import AppealIngestionSpeedBump from './AppealIngestionSpeedBump.tsx'; /* Metro dependency 11490 */ import AppealIngestionCollectSignal from './AppealIngestionCollectSignal.tsx'; /* Metro dependency 11495 */ import AppealIngestionConfirmSubmission from './AppealIngestionConfirmSubmission.tsx'; /* Metro dependency 11497 */ import AppealIngestionRequestSent from './AppealIngestionRequestSent.tsx'; /* Metro dependency 11499 */ import AppealIngestionThanks from './AppealIngestionThanks.tsx'; /* Metro dependency 11501 */ import AppealIngestionSpam from './AppealIngestionSpam.tsx'; /* Metro dependency 11502 */ 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 AnalyticsUtilsModule from '../../../external/discord_common/js/packages/analytics-utils/AnalyticsUtils.tsx'; /* Metro dependency 480 */ 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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */ import * as UseNavigationNativeModule from '../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */ 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 SafetyHubConstantsModule from '../SafetyHubConstants.tsx'; /* Metro dependency 5267 */ import * as NavigatorNativeModule from '../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */ import * as UseSafetyHubClassificationsModule from '../hooks/useSafetyHubClassifications.tsx'; /* Metro dependency 11479 */ function _fun88020(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88020, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:6, offset: 0x01fd1aa4, size: 535 bytes, params: 8, frame: 22 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = SafetyHubConstantsModule; const env0_9 = value.APPEAL_INGESTION_IMPRESSION_PROPERTIES; const env0_10 = value.AppealIngestionSections; value = require(33) /* metro dependency 33 */; const env0_12 = value.jsx; const env0_13 = value.jsxs; const env0_14 = value.Fragment; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; object = {}; const BACKGROUND_BASE_LOW = (Native).colors.BACKGROUND_BASE_LOW; object.container = {flex: 1, backgroundColor: BACKGROUND_BASE_LOW}; object.headerContainer = {'alignSelf': 'stretch', 'marginTop': 16, 'marginBottom': 8, 'paddingHorizontal': 16}; object.header = {'marginBottom': 8, 'textAlign': 'center'}; object.subheader = {'lineHeight': 20, 'marginBottom': 8, 'textAlign': 'center'}; const BORDER_SUBTLE = (Native).colors.BORDER_SUBTLE; object.separator = {'height': 1, 'backgroundColor': null, 'marginVertical': 24, backgroundColor: BORDER_SUBTLE}; object.footerContainer = {marginBottom: 16}; object.footerText = {'marginBottom': 16, 'textAlign': 'center'}; object.footerButton = {paddingHorizontal: 16}; const env0_15 = Reflect.apply(createStyles, value, [object]); (FileImportTrackerModule).fileFinishedImporting('modules/safety_hub/native/AppealIngestionModal.tsx'); exports.default = AppealIngestionModal; exports.AppealIngestionModalHeader = AppealIngestionModalHeader; exports.AppealIngestionModalScreen = AppealIngestionModalScreen; function getHeader(a0) { // fn#88021, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:796, offset: 0x01fd1cbb, size: 58 bytes, params: 2, frame: 14 const Text = (TextModule).Text; return ; } function AppealIngestionModal({classificationId}) { // fn#88022, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:975, offset: 0x01fd1cf5, size: 276 bytes, params: 2, frame: 18 const value3 = (UseSafetyHubClassificationsModule).useSafetyHubClassification(classificationId); const env0_0 = value3.isDsaEligible; if (value3.classification?.is_spam) { } if (value3.classification?.is_coppa) { } const value6 = (importDefault(6518) /* metro dependency 6518: useInitialValue */)(function() { return _fun88024(isDsaEligible, is_spam, is_coppa); }); const Navigator = (NavigatorNativeModule).Navigator; const SPEED_BUMP = AppealIngestionSections.SPEED_BUMP; const intl = (IndexNativeModule).intl; return ( ); function _fun88023() { // fn#88023, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:1211, offset: 0x01fd1e09, size: 35 bytes, params: 1, frame: 15 return getScreens_88024(isDsaEligible, is_spam, is_coppa); function getScreens_88024(a0, a1, a2) { // fn#88024, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:1215, offset: 0x01fd1e2c, size: 677 bytes, params: 4, frame: 24 var environment; const env0_0 = a0; const env0_1 = a1; const env0_2 = a2; const object = {}; const value = environment.__proto__.__proto__; const SPEED_BUMP = AppealIngestionSections.SPEED_BUMP; const object2 = {}; object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(11488) /* metro dependency 11488: AppealIngestionModalActionCreators */).close); object2.headerTitle = function() { return getHeader(); }; object2.render = render_88026; const ImpressionNames = (AnalyticsUtilsModule).ImpressionNames; const APPEAL_INGESTION_SPEED_BUMP = ImpressionNames.APPEAL_INGESTION_SPEED_BUMP; object2.impressionName = APPEAL_INGESTION_SPEED_BUMP; object2.impressionProperties = APPEAL_INGESTION_IMPRESSION_PROPERTIES; object[SPEED_BUMP] = object2; const COLLECT_SIGNAL = AppealIngestionSections.COLLECT_SIGNAL; const object3 = {}; object3.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(); object3.headerTitle = function() { return getHeader(); }; object3.render = render_88028; const APPEAL_INGESTION_COLLECT_SIGNAL = ImpressionNames.APPEAL_INGESTION_COLLECT_SIGNAL; object3.impressionName = APPEAL_INGESTION_COLLECT_SIGNAL; object3.impressionProperties = APPEAL_INGESTION_IMPRESSION_PROPERTIES; object[COLLECT_SIGNAL] = object3; const CONFIRM_SUBMISSION = AppealIngestionSections.CONFIRM_SUBMISSION; const object4 = {}; object4.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton(); object4.headerTitle = function() { return getHeader(); }; object4.render = render_88030; const APPEAL_INGESTION_CONFIRM_SUBMISSION = ImpressionNames.APPEAL_INGESTION_CONFIRM_SUBMISSION; object4.impressionName = APPEAL_INGESTION_CONFIRM_SUBMISSION; object4.impressionProperties = APPEAL_INGESTION_IMPRESSION_PROPERTIES; object[CONFIRM_SUBMISSION] = object4; const REQUEST_SENT = AppealIngestionSections.REQUEST_SENT; const object5 = {}; object5.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(11488) /* metro dependency 11488: AppealIngestionModalActionCreators */).close); object5.headerTitle = function() { return getHeader(); }; object5.render = render_88032; const APPEAL_INGESTION_REQUEST_SENT = ImpressionNames.APPEAL_INGESTION_REQUEST_SENT; object5.impressionName = APPEAL_INGESTION_REQUEST_SENT; object5.impressionProperties = APPEAL_INGESTION_IMPRESSION_PROPERTIES; object[REQUEST_SENT] = object5; const THANKS = AppealIngestionSections.THANKS; const object6 = {}; object6.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(11488) /* metro dependency 11488: AppealIngestionModalActionCreators */).close); object6.headerTitle = function() { return getHeader(); }; object6.render = render_88034; const APPEAL_INGESTION_THANKS = ImpressionNames.APPEAL_INGESTION_THANKS; object6.impressionName = APPEAL_INGESTION_THANKS; object6.impressionProperties = APPEAL_INGESTION_IMPRESSION_PROPERTIES; object[THANKS] = object6; const SPAM = AppealIngestionSections.SPAM; const object7 = {}; object7.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton((importDefault(11488) /* metro dependency 11488: AppealIngestionModalActionCreators */).close); object7.headerTitle = function() { return getHeader(); }; object7.render = render_88036; const APPEAL_INGESTION_SPAM = ImpressionNames.APPEAL_INGESTION_SPAM; object7.impressionName = APPEAL_INGESTION_SPAM; object7.impressionProperties = APPEAL_INGESTION_IMPRESSION_PROPERTIES; object[SPAM] = object7; return object; function getScreens_88024Render() { // fn#88026, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:1357, owner: getScreens_88024.render, offset: 0x01fd20e0, size: 69 bytes, params: 1, frame: 15 const value = environment.__proto__.__proto__.__proto__; return ((Component) => )(AppealIngestionSpeedBump); } function getScreens_88024Render_88028() { // fn#88028, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:1599, owner: getScreens_88024.render, offset: 0x01fd2125, size: 51 bytes, params: 1, frame: 14 const value = environment.__proto__.__proto__.__proto__; return ((Component) => )(AppealIngestionCollectSignal); } function getScreens_88024Render_88030() { // fn#88030, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:1830, owner: getScreens_88024.render, offset: 0x01fd2158, size: 51 bytes, params: 1, frame: 14 const value = environment.__proto__.__proto__.__proto__; return ((Component) => )(AppealIngestionConfirmSubmission); } function getScreens_88024Render_88032() { // fn#88032, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:2074, owner: getScreens_88024.render, offset: 0x01fd218b, size: 39 bytes, params: 1, frame: 13 const value = environment.__proto__.__proto__.__proto__; return ((Component) => )(AppealIngestionRequestSent); } function getScreens_88024Render_88034() { // fn#88034, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:2291, owner: getScreens_88024.render, offset: 0x01fd21b2, size: 39 bytes, params: 1, frame: 13 const value = environment.__proto__.__proto__.__proto__; return ((Component) => )(AppealIngestionThanks); } function getScreens_88024Render_88036() { // fn#88036, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:2500, owner: getScreens_88024.render, offset: 0x01fd21d9, size: 39 bytes, params: 1, frame: 13 const value = environment.__proto__.__proto__.__proto__; return ((Component) => )(AppealIngestionSpam); } } } } function AppealIngestionModalHeader({headerText, subHeaderText}) { // fn#88037, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:2802, offset: 0x01fd2200, size: 246 bytes, params: 2, frame: 23 const styles = useStyles(); const items2 = [ headerText != null && headerText !== '' && ((Text) => {headerText})((require(4573) /* metro dependency 4573: Text */).Text), ]; items2[1] = ( subHeaderText != null && subHeaderText.length > 0 ? ((Text) => {subHeaderText})((require(4573) /* metro dependency 4573: Text */).Text) : null ); return ( {items2} ); } function AppealIngestionModalScreen({children}) { // fn#88038, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11675:3234, offset: 0x01fd22f6, size: 1277 bytes, params: 2, frame: 39 var r11; var r7; var SafeAreaPaddingView; const Button = (ButtonNativeModule).Button; var object; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const t = (require(1244) /* metro dependency 1244: indexNative */).t; var jsxRuntimeEnv0_14Binding; const Text = (TextModule).Text; var items3; var object2; const env0_5 = undefined; let env0_6 = undefined; const styles = useStyles(); const useStateFromStores = FluxModule.useStateFromStores; const safetyHubStoreBinding = SafetyHubStore; const isSubmitting = Reflect.apply(useStateFromStores, FluxModule, [[safetyHubStoreBinding], function() { return SafetyHubStore.getIsSubmitting(); }]); const value3 = (require(11479) /* metro dependency 11479: useSafetyHubClassifications */).useSafetyHubAppealSignal(); const freeTextAppealReason = FluxModule.useStateFromStores([safetyHubStoreBinding], function() { return SafetyHubStore.getFreeTextAppealReason(); }); const appealClassificationId = FluxModule.useStateFromStores([safetyHubStoreBinding], function() { return SafetyHubStore.getAppealClassificationId(); }); const value4 = (require(11479) /* metro dependency 11479: useSafetyHubClassifications */).useSafetyHubClassification(appealClassificationId ?? EMPTY_STRING_SNOWFLAKE_ID); let is_spam = value4.classification?.is_spam; is_spam = !!is_spam && is_spam; let is_coppa = value4.classification?.is_coppa; is_coppa = !!is_coppa && is_coppa; const appeal_ingestion_type = value4.classification?.appeal_ingestion_type; const value7 = (UseNavigationNativeModule).useNavigation(); let r2 = appeal_ingestion_type != null && appeal_ingestion_type !== (require(5268) /* metro dependency 5268: SafetyHubModels */).AppealIngestionType.IN_APP; r2 = !r2 ? is_coppa : r2; r2 = !r2 ? is_spam : r2; const value10 = !r2; const binding = env0_6; let useState = binding.useState; const value11 = Reflect.apply(useState, binding, ['']); const binding2 = env0_5; const value12 = binding2(value11, 2); const property = value12[0]; const env0_4 = value12[1]; useState = binding.useState; const value13 = binding2(Reflect.apply(useState, binding, ['']), 2); const property2 = value13[0]; env0_6 = value13[1]; binding.useEffect(_fun88042, [value7]); const value14 = binding.useCallback(_fun88045, [value7, property2]); const value16 = binding.useCallback(env0_4(_fun88047), [appealClassificationId, value3, freeTextAppealReason, value14]); const view = ; if (r2) { r7 = value10; } else { SafeAreaPaddingView = (require(6618) /* metro dependency 6618: SafeAreaView */).SafeAreaPaddingView; var safeAreaPaddingViewProps = {bottom: true, style: styles.footerButton}; if (property2 === AppealIngestionSections.CONFIRM_SUBMISSION) { jsxRuntimeEnv0_14Binding = jsxRuntimeEnv0_14; items3 = [ {intl.string(t['d6qgY/'])} , ]; items3[1] = property !== '' && {property}; items3[2] = (