182 lines
9.9 KiB
TypeScript
182 lines
9.9 KiB
TypeScript
/* Metro module 6260; source: modules/age_assurance/native/AgeVerificationMethodsContainer.tsx; dependencies: [31, 5262, 5267, 33, 4501, 697, 5266, 4826, 4831, 4572, 1305, 1244, 6231, 4573, 2742, 6261, 4578, 6257, 6238, 5263, 2] */
|
|
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
|
|
import * as StackNativeModule from '../../../design/components/Stack/native/Stack.native.tsx'; /* Metro dependency 4572 */
|
|
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 AgeVerificationConstantsModule from '../AgeVerificationConstants.tsx'; /* Metro dependency 5262 */
|
|
import * as SafetyHubUtilsModule from '../../safety_hub/SafetyHubUtils.tsx'; /* Metro dependency 5266 */
|
|
import * as SafetyHubConstantsModule from '../../safety_hub/SafetyHubConstants.tsx'; /* Metro dependency 5267 */
|
|
import * as TableRowGroupNativeModule from '../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
|
|
import * as TableRowNativeModule from '../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
|
|
import * as ButtonGroupNativeModule from '../../../design/components/ButtonGroup/native/ButtonGroup.native.tsx'; /* Metro dependency 6261 */
|
|
|
|
function _fun49428(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#49428, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6438:6, offset: 0x011f9060, size: 359 bytes, params: 8, frame: 23
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = JsxRuntimeModule;
|
|
const env0_6 = value.jsx;
|
|
const env0_7 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object.content = {marginTop: PX_8};
|
|
const object3 = {};
|
|
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object3.marginTop = PX_24;
|
|
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object3.marginBottom = PX_24;
|
|
object.errorContainer = object3;
|
|
const PX_40 = (importDefault(697) /* metro dependency 697: native */).space.PX_40;
|
|
object.noMethodsText = {paddingHorizontal: PX_40, textAlign: 'center'};
|
|
object.buttonGroup = {paddingVertical: 0};
|
|
const env0_8 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/age_assurance/native/AgeVerificationMethodsContainer.tsx');
|
|
exports.AgeVerificationMethodsContainer = AgeVerificationMethodsContainer;
|
|
function AgeVerificationMethodsContainer({ageVerificationMethods, modalSessionId}) { // fn#49429, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6438:570, offset: 0x011f91c7, size: 840 bytes, params: 2, frame: 39
|
|
var r14;
|
|
const Stack3 = (StackNativeModule).Stack;
|
|
const Text = (TextModule).Text;
|
|
var items2;
|
|
const ButtonGroup = (ButtonGroupNativeModule).ButtonGroup;
|
|
const Button = (ButtonNativeModule).Button;
|
|
const styles = useStyles();
|
|
const value2 = (SafetyHubUtilsModule).useIsSuspendedUser();
|
|
ReactModule.useEffect(_fun49430, [ageVerificationMethods]);
|
|
const Stack = (StackNativeModule).Stack;
|
|
const Stack2 = (StackNativeModule).Stack;
|
|
const HelpMessage = (NativeModule).HelpMessage;
|
|
const HelpMessageTypes = (NativeModule).HelpMessageTypes;
|
|
const INFO = HelpMessageTypes.INFO;
|
|
const intl = (IndexNativeModule).intl;
|
|
const string = intl.string;
|
|
const El4aXl = (IndexNativeModule).t.El4aXl;
|
|
const helpMessage = (
|
|
<HelpMessage
|
|
messageType={INFO}
|
|
textColor="text-feedback-info"
|
|
textVariant="text-sm/medium"
|
|
>
|
|
{Reflect.apply(string, intl, [El4aXl])}
|
|
</HelpMessage>
|
|
);
|
|
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
|
|
if (ageVerificationMethods == null) {
|
|
var stack3Props = {'direction': 'vertical', 'align': 'center', 'spacing': 16, style: styles.errorContainer};
|
|
items2 = [
|
|
<Text
|
|
variant="text-sm/medium"
|
|
color="text-subtle"
|
|
style={styles.noMethodsText}
|
|
>
|
|
{intl.string((importDefault(2742) /* metro dependency 2742: AgeAssuranceMessages */).cR6336)}
|
|
</Text>,
|
|
];
|
|
items2[1] = (
|
|
<ButtonGroup style={styles.buttonGroup}>
|
|
<Button
|
|
variant="primary"
|
|
size="lg"
|
|
text={intl.string((importDefault(2742) /* metro dependency 2742: AgeAssuranceMessages */).hDvmYP)}
|
|
onPress={(require(6257) /* metro dependency 6257: AgeVerificationURLActionCreators */).getAgeVerificationMethods}
|
|
/>
|
|
</ButtonGroup>
|
|
);
|
|
r14 = (
|
|
<Stack3 {...stack3Props}>
|
|
{items2}
|
|
</Stack3>
|
|
);
|
|
} else if (ageVerificationMethods.length === 0) {
|
|
var stack3Props = {'direction': 'vertical', 'align': 'center', 'spacing': 16, style: styles.errorContainer};
|
|
items2 = [
|
|
<Text
|
|
variant="text-sm/medium"
|
|
color="text-subtle"
|
|
style={styles.noMethodsText}
|
|
>
|
|
{intl.string((importDefault(2742) /* metro dependency 2742: AgeAssuranceMessages */).cR6336)}
|
|
</Text>,
|
|
];
|
|
items2[1] = (
|
|
<ButtonGroup style={styles.buttonGroup}>
|
|
<Button
|
|
variant="primary"
|
|
size="lg"
|
|
text={intl.string((importDefault(2742) /* metro dependency 2742: AgeAssuranceMessages */).hDvmYP)}
|
|
onPress={(require(6257) /* metro dependency 6257: AgeVerificationURLActionCreators */).getAgeVerificationMethods}
|
|
/>
|
|
</ButtonGroup>
|
|
);
|
|
r14 = (
|
|
<Stack3 {...stack3Props}>
|
|
{items2}
|
|
</Stack3>
|
|
);
|
|
} else {
|
|
r14 = ageVerificationMethods.map(_fun49432);
|
|
}
|
|
return (
|
|
<Stack spacing={8} align="center">
|
|
<Stack2 spacing={16} style={styles.content}>
|
|
{helpMessage}
|
|
<TableRowGroup hasIcons={false}>
|
|
{r14}
|
|
</TableRowGroup>
|
|
</Stack2>
|
|
{value2 && <Text variant="text-xs/medium">{intl.format((importDefault(2742) /* metro dependency 2742: AgeAssuranceMessages */).htWh1G,
|
|
{handleOnHelpUrlHook: function() {
|
|
importDefault(dependencyMap[19]).openUrl(SafetyHubLinks.LEARN_MORE_UU_APPEAL_LINK);
|
|
}})}</Text>}
|
|
</Stack>
|
|
);
|
|
function _fun49430() { // fn#49430, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6438:717, offset: 0x011f950f, size: 115 bytes, params: 1, frame: 15
|
|
var environment;
|
|
var defaultImport;
|
|
var increment;
|
|
var object;
|
|
var value;
|
|
if (ageVerificationMethods != null && ageVerificationMethods.some(function({id}) {
|
|
return id === VerificationMethod.GOOGLE_WALLET;
|
|
})) {
|
|
value = environment.__proto__;
|
|
defaultImport = importDefault(4826) /* metro dependency 4826: MonitoringAgent */;
|
|
increment = defaultImport.increment;
|
|
object = {};
|
|
object.name = (require(4831) /* metro dependency 4831: MetricEvents */).MetricEvents.GOOGLE_WALLET_METHOD_IMPRESSION;
|
|
Reflect.apply(increment, defaultImport, [object]);
|
|
}
|
|
}
|
|
|
|
function _fun49432(a0) { // fn#49432, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6438:1637, offset: 0x011f959d, size: 95 bytes, params: 2, frame: 17
|
|
const env0_0 = a0;
|
|
const TableRow = (TableRowNativeModule).TableRow;
|
|
return (
|
|
<TableRow
|
|
label={a0.title}
|
|
subLabel={a0.description}
|
|
onPress={onPress_49433}
|
|
arrow
|
|
key={a0.id}
|
|
/>
|
|
);
|
|
function onPress_49433() { // fn#49433, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:6438:1706, offset: 0x011f95fc, size: 27 bytes, params: 1, frame: 11
|
|
const binding = env0_0;
|
|
return binding.onClick(modalSessionId);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun49428, 6260, [31, 5262, 5267, 33, 4501, 697, 5266, 4826, 4831, 4572, 1305, 1244, 6231, 4573, 2742,
|
|
6261, 4578, 6257, 6238, 5263,
|
|
2]) /* metro module 6260, dependencies: [31, 5262, 5267, 33, 4501, 697, 5266, 4826, 4831, 4572, 1305, 1244, 6231, 4573, 2742, 6261, 4578, 6257, 6238, 5263, 2] */;
|