Files
2026-07-28 01:06:53 +03:00

110 lines
6.9 KiB
TypeScript

/* Metro module 11983; source: components_native/warnings/GatedContent.tsx; dependencies: [31, 33, 4501, 697, 5074, 4572, 4573, 6261, 4578, 2] */
import Native from '../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
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 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 ButtonGroupNativeModule from '../../design/components/ButtonGroup/native/ButtonGroup.native.tsx'; /* Metro dependency 6261 */
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});
let value = JsxRuntimeModule;
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 = (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}}]);
(FileImportTrackerModule).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 = (ButtonNativeModule).Button;
agreementButtonVariant = agreementButtonVariant === undefined ? 'primary' : agreementButtonVariant;
disagreementButtonVariant = disagreementButtonVariant === undefined ? 'secondary' : disagreementButtonVariant;
const modalType2 = modalType;
const styles = useStyles();
const binding = modalType2;
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 = (StackNativeModule).Stack;
const Stack2 = (StackNativeModule).Stack;
const Text = (TextModule).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 = (ButtonGroupNativeModule).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();
}
}
}
}
global.__d(_fun91978, 11983, [31, 33, 4501, 697, 5074, 4572, 4573, 6261, 4578,
2]) /* metro module 11983, dependencies: [31, 33, 4501, 697, 5074, 4572, 4573, 6261, 4578, 2] */;