81 lines
5.5 KiB
TypeScript
81 lines
5.5 KiB
TypeScript
/* Metro module 11983; source: components_native/warnings/GatedContent.tsx; dependencies: [31, 33, 4501, 697, 5074, 4572, 4573, 6261, 4578, 2] */
|
|
function _fun91978(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91978, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12169:6, offset: 0x020789da, size: 265 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_2 = importAll(31) /* metro dependency 31 */;
|
|
let value = require(33) /* metro dependency 33 */;
|
|
const env0_3 = value.jsx;
|
|
const env0_4 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
const env0_5 = Reflect.apply(createStyles, value, [{container: {'flex': 1, 'padding': 20, 'alignItems': 'center',
|
|
'justifyContent': 'center', 'backgroundColor': null, 'textAlign': 'center',
|
|
backgroundColor: BACKGROUND_BASE_LOW}, title: {textAlign: 'center'}, description: {textAlign: 'center'},
|
|
buttonGroup: {'width': '100%', 'maxWidth': 400}}]);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('components_native/warnings/GatedContent.tsx');
|
|
exports.default = GatedContent;
|
|
}
|
|
|
|
function GatedContent({title, subtitle, description, agreement, agreementButtonVariant, disagreement, disagreementButtonVariant, onAgree, onDisagree, modalType, channelId, guildId}) { // fn#91979, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12169:490, offset: 0x02078ae3, size: 632 bytes, params: 2, frame: 34
|
|
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
|
agreementButtonVariant = agreementButtonVariant === undefined ? 'primary' : agreementButtonVariant;
|
|
disagreementButtonVariant = disagreementButtonVariant === undefined ? 'secondary' : disagreementButtonVariant;
|
|
const env0_2 = modalType;
|
|
const styles = useStyles();
|
|
const binding = env0_2;
|
|
binding.useEffect(_fun91980, [modalType, channelId, guildId]);
|
|
const value2 = binding.useCallback(_fun91981, [onDisagree, modalType, channelId, guildId]);
|
|
const value3 = binding.useCallback(_fun91982, [onAgree, modalType, channelId, guildId]);
|
|
const Stack = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
|
const Stack2 = (require(4572) /* metro dependency 4572: StackNative */).Stack;
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
const stack = <Stack2 align="center"><Text variant="heading-xxl/bold" maxFontSizeMultiplier={2} style={styles.title}>{title}</Text>{subtitle}<Text color="text-muted" variant="text-md/medium" style={styles.description} maxFontSizeMultiplier={2}>{description}</Text></Stack2>;
|
|
const ButtonGroup = (require(6261) /* metro dependency 6261: ButtonGroupNative */).ButtonGroup;
|
|
return (
|
|
<Stack spacing={16} style={styles.container}>
|
|
{stack}
|
|
<ButtonGroup style={styles.buttonGroup}>
|
|
{agreement != null && onAgree != null && <Button variant={agreementButtonVariant} onPress={value3} text={agreement} />}
|
|
<Button
|
|
variant={disagreementButtonVariant}
|
|
text={disagreement}
|
|
onPress={value2}
|
|
/>
|
|
</ButtonGroup>
|
|
</Stack>
|
|
);
|
|
}
|
|
|
|
function _fun91980() { // fn#91980, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12169:730, offset: 0x02078d5b, size: 55 bytes, params: 1, frame: 16
|
|
let value = environment.__proto__;
|
|
value = require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */;
|
|
value.trackNsfwSpaceWarningModalViewed(modalType, channelId, guildId);
|
|
}
|
|
|
|
function _fun91981() { // fn#91981, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12169:815, offset: 0x02078d92, size: 94 bytes, params: 1, frame: 19
|
|
let value = environment.__proto__;
|
|
value = require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */;
|
|
const trackNsfwSpaceWarningModalClicked = value.trackNsfwSpaceWarningModalClicked;
|
|
const NsfwSpaceWarningModalCta = (require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */).NsfwSpaceWarningModalCta;
|
|
const NSFW_CHANNEL_DISAGREE_CTA = NsfwSpaceWarningModalCta.NSFW_CHANNEL_DISAGREE_CTA;
|
|
Reflect.apply(trackNsfwSpaceWarningModalClicked, value, [NSFW_CHANNEL_DISAGREE_CTA, modalType, channelId, guildId]);
|
|
if (onDisagree != null) {
|
|
onDisagree();
|
|
}
|
|
}
|
|
|
|
function _fun91982() { // fn#91982, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12169:971, offset: 0x02078df0, size: 94 bytes, params: 1, frame: 19
|
|
let value = environment.__proto__;
|
|
value = require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */;
|
|
const trackNsfwSpaceWarningModalClicked = value.trackNsfwSpaceWarningModalClicked;
|
|
const NsfwSpaceWarningModalCta = (require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */).NsfwSpaceWarningModalCta;
|
|
const NSFW_CHANNEL_AGREE_CTA = NsfwSpaceWarningModalCta.NSFW_CHANNEL_AGREE_CTA;
|
|
Reflect.apply(trackNsfwSpaceWarningModalClicked, value, [NSFW_CHANNEL_AGREE_CTA, modalType, channelId, guildId]);
|
|
if (onAgree != null) {
|
|
onAgree();
|
|
}
|
|
}
|
|
|