119 lines
7.4 KiB
TypeScript
119 lines
7.4 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] */
|
|
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
|
|
var object2;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importAll(31) /* metro dependency 31 */;
|
|
const env0_4 = (require(5262) /* metro dependency 5262: AgeVerificationConstants */).VerificationMethod;
|
|
const env0_5 = (require(5267) /* metro dependency 5267: SafetyHubConstants */).SafetyHubLinks;
|
|
let 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;
|
|
object2 = {};
|
|
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
|
|
object2.content = {marginTop: PX_8};
|
|
const object4 = {};
|
|
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object4.marginTop = PX_24;
|
|
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
|
|
object4.marginBottom = PX_24;
|
|
object2.errorContainer = object4;
|
|
const PX_40 = (importDefault(697) /* metro dependency 697: native */).space.PX_40;
|
|
object2.noMethodsText = {paddingHorizontal: PX_40, textAlign: 'center'};
|
|
object2.buttonGroup = {paddingVertical: 0};
|
|
const env0_8 = Reflect.apply(createStyles, value, [object2]);
|
|
(require(2) /* metro dependency 2 */).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 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
var items2;
|
|
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
|
|
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
|
const styles = useStyles();
|
|
const value2 = (require(5266) /* metro dependency 5266: SafetyHubUtils */).useIsSuspendedUser();
|
|
env0_3.useEffect(_fun49430, [ageVerificationMethods]);
|
|
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
|
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
|
const HelpMessage = (require(1305) /* metro dependency 1305: native */).HelpMessage;
|
|
const HelpMessageTypes = (require(1305) /* metro dependency 1305: native */).HelpMessageTypes;
|
|
const INFO = HelpMessageTypes.INFO;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const string = intl.string;
|
|
const El4aXl = (require(1244) /* metro dependency 1244: indexNative */).t.El4aXl;
|
|
const helpMessage = <HelpMessage messageType={INFO} textColor="text-feedback-info" textVariant="text-sm/medium">{Reflect.apply(string,
|
|
intl, [El4aXl])}</HelpMessage>;
|
|
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).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 object2;
|
|
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;
|
|
object2 = {};
|
|
object2.name = (require(4831) /* metro dependency 4831: MetricEvents */).MetricEvents.GOOGLE_WALLET_METHOD_IMPRESSION;
|
|
Reflect.apply(increment, defaultImport, [object2]);
|
|
}
|
|
}
|
|
|
|
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 = (require(6238) /* metro dependency 6238: TableRowNative */).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);
|
|
}
|
|
|