Files
discord-decomp/sources/modules/age_assurance/native/AgeVerificationGetStartedModal.tsx
T
2026-07-28 01:06:53 +03:00

158 lines
11 KiB
TypeScript

/* Metro module 5470; source: modules/age_assurance/native/AgeVerificationGetStartedModal.tsx; dependencies: [31, 33, 4501, 697, 5080, 5282, 5471, 6251, 6252, 6262, 491, 5074, 5280, 1244, 2] */
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import AgeVerificationIntroScreen from './AgeVerificationIntroScreen.tsx'; /* Metro dependency 5471 */
import AgeVerificationRetryScreen from './AgeVerificationRetryScreen.tsx'; /* Metro dependency 6251 */
import AgeVerificationEmbeddedIntroScreen from './AgeVerificationEmbeddedIntroScreen.tsx'; /* Metro dependency 6252 */
import GoogleWalletVerificationScreen from './GoogleWalletVerificationScreen.tsx'; /* Metro dependency 6262 */
import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
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 Module00491Module from '../../../by-id/module-00491.js'; /* Metro dependency 491 */
import * as CreateStylesModule from '../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
import * as NavigatorNativeModule from '../../../design/components/Navigator/native/Navigator.native.tsx'; /* Metro dependency 5280 */
function _fun48062(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#48062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5648:6, offset: 0x011d8ae4, size: 272 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const createStyles = CreateStylesModule.createStyles;
const BACKGROUND_BASE_LOWER = (Native).colors.BACKGROUND_BASE_LOWER;
const env0_5 = Reflect.apply(createStyles, CreateStylesModule,
[{headerStyle: {backgroundColor: BACKGROUND_BASE_LOWER, shadowColor: 'transparent'}}]);
(FileImportTrackerModule).fileFinishedImporting('modules/age_assurance/native/AgeVerificationGetStartedModal.tsx');
exports.default = AgeVerificationGetStartedModal;
exports.AgeVerificationGetStartedModalScenes = {INTRO: 'INTRO', RETRY: 'RETRY',
EXPRESSIVE_INTRO: 'EXPRESSIVE_INTRO', GOOGLE_WALLET_VERIFICATION: 'GOOGLE_WALLET_VERIFICATION'};
function getInitialRouteName(a0, a1) { // fn#48063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5648:395, offset: 0x011d8bf4, size: 43 bytes, params: 3, frame: 3
const binding = env0_6;
return a1 ? binding.EXPRESSIVE_INTRO : a0 ? binding.RETRY : binding.INTRO;
}
function AgeVerificationGetStartedModal({entryPoint, isRetry, useEmbeddedMethods, classificationId, onComplete}) { // fn#48064, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5648:583, offset: 0x011d8c1f, size: 334 bytes, params: 2, frame: 22
useEmbeddedMethods = !(useEmbeddedMethods === undefined) && useEmbeddedMethods;
const classificationId2 = classificationId;
const styles = useStyles();
const binding = classificationId2;
const value2 = binding.useMemo(_fun48065, []);
const value3 = binding.useMemo(_fun48066, [styles, value2, classificationId, onComplete, entryPoint]);
binding.useEffect(_fun48079, [value2, entryPoint, binding.useMemo(function() {
var r0;
var isRetryBinding;
var property;
if (useEmbeddedMethods) {
r0 = require(dependencyMap[11]).AgeVerificationModalVersion.EXPRESSIVE_PRIMARY;
} else {
isRetryBinding = isRetry;
property = require(dependencyMap[11]).AgeVerificationModalVersion;
r0 = isRetryBinding ? property.RETRY : property.PRIMARY;
}
return r0;
}, [useEmbeddedMethods, isRetry])]);
const Navigator = (NavigatorNativeModule).Navigator;
const navigatorProps = {screens: value3, initialRouteName: getInitialRouteName(isRetry, useEmbeddedMethods)};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
navigatorProps.headerBackTitle = intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX']);
return <Navigator {...navigatorProps} />;
function _fun48065() { // fn#48065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5648:728, offset: 0x011d8d6d, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (Module00491Module).v4();
}
function _fun48066() { // fn#48066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5648:764, offset: 0x011d8d92, size: 38 bytes, params: 1, frame: 19
return getScreens_48067(styles, env0_6, entryPoint, classificationId, onComplete);
function getScreens_48067(a0, a1, a2, a3, a4) { // fn#48067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5648:768, offset: 0x011d8db8, size: 362 bytes, params: 6, frame: 21
var environment;
const env0_0 = a1;
const env0_1 = a2;
const env0_2 = a3;
const env0_3 = a4;
const closeModal2 = closeModal;
const object = {};
const value = environment.__proto__.__proto__;
const INTRO = env2_6.INTRO;
const object2 = {};
object2.headerStyle = a0.headerStyle;
object2.headerTitle = function() {
return null;
};
object2.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(closeModal2);
object2.render = render_48071;
object[INTRO] = object2;
const RETRY = env2_6.RETRY;
const object3 = {};
object3.headerStyle = a0.headerStyle;
object3.headerTitle = function() {
return null;
};
object3.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(closeModal2);
object3.render = render_48073;
object[RETRY] = object3;
const EXPRESSIVE_INTRO = env2_6.EXPRESSIVE_INTRO;
const object4 = {};
object4.headerStyle = a0.headerStyle;
object4.headerTitle = function() {
return null;
};
object4.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderCloseButton(closeModal2);
object4.render = render_48075;
object[EXPRESSIVE_INTRO] = object4;
const GOOGLE_WALLET_VERIFICATION = env2_6.GOOGLE_WALLET_VERIFICATION;
const object5 = {};
object5.headerStyle = a0.headerStyle;
object5.headerTitle = function() {
return null;
};
object5.headerLeft = (require(5282) /* metro dependency 5282: NavigatorHeaderNative */).getHeaderBackButton();
object5.render = render_48077;
object[GOOGLE_WALLET_VERIFICATION] = object5;
return object;
function closeModal() { // fn#48068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5648:814, owner: getScreens_48067.closeModal, offset: 0x011d8f22, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__.__proto__.__proto__;
return (ModalActionCreators).pop();
}
function closeModalWithOnComplete() { // fn#48069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5648:857, owner: getScreens_48067.closeModalWithOnComplete, offset: 0x011d8f47, size: 33 bytes, params: 1, frame: 11
closeModal();
if (env0_3 != null) {
env0_3();
}
}
function getScreens_48067Render() { // fn#48071, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5648:1013, owner: getScreens_48067.render, offset: 0x011d8f68, size: 69 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component onClose={closeModal} modalSessionId={require} entryPoint={importDefault} />)(AgeVerificationIntroScreen);
}
function getScreens_48067Render_48073() { // fn#48073, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5648:1197, owner: getScreens_48067.render, offset: 0x011d8fad, size: 60 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component onClose={closeModal} modalSessionId={require} />)(AgeVerificationRetryScreen);
}
function getScreens_48067Render_48075(a0, a1) { // fn#48075, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5648:1379, owner: getScreens_48067.render, offset: 0x011d8fe9, size: 86 bytes, params: 3, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component onClose={closeModalWithOnComplete} modalSessionId={require} classificationId={importAll} entryPoint={importDefault} navigation={a1} />)(AgeVerificationEmbeddedIntroScreen);
}
function getScreens_48067Render_48077() { // fn#48077, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5648:1622, owner: getScreens_48067.render, offset: 0x011d903f, size: 60 bytes, params: 1, frame: 15
const value = environment.__proto__.__proto__.__proto__;
return ((Component) => <Component onClose={closeModalWithOnComplete} modalSessionId={require} />)(GoogleWalletVerificationScreen);
}
}
}
function _fun48079() { // fn#48079, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5648:1910, offset: 0x011d90df, size: 55 bytes, params: 1, frame: 16
let value = environment.__proto__;
value = require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */;
value.trackAgeVerificationModalViewed(env0_6, env0_7, entryPoint);
}
}
}
global.__d(_fun48062, 5470, [31, 33, 4501, 697, 5080, 5282, 5471, 6251, 6252, 6262, 491, 5074, 5280, 1244,
2]) /* metro module 5470, dependencies: [31, 33, 4501, 697, 5080, 5282, 5471, 6251, 6252, 6262, 491, 5074, 5280, 1244, 2] */;