// Module ID: 12145 // Function ID: 12146 // Name: GatedContent // Dependencies: [19, 21, 4829, 576, 7853, 5274, 5272, 4825, 5740, 2] // Exports: default // Module 12145 (GatedContent) import nativeDefault from "native" /* 576 */; import AgeVerificationAnalyticsUtils from "AgeVerificationAnalyticsUtils" /* 7853 */; import noop from "module_19" /* 19 */; require = fn; const jsxProd = fn(21); ({ jsx: c3, jsxs: closure_4 } = jsxProd); const createStyles = fn(4829); let obj2 = { container: { flex: 1, padding: 20, alignItems: "center", justifyContent: "center", backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOW, textAlign: "center" }, title: { textAlign: "center" }, description: { textAlign: "center" }, buttonGroup: { width: "100%", maxWidth: 400 } }; let closure_5 = createStyles.createStyles(obj2); const size = fn(2); let result = size.fileFinishedImporting("components_native/warnings/GatedContent.tsx"); export default function GatedContent(onAgree) { ({ agreement, agreementButtonVariant } = onAgree); ({ title, subtitle, description } = onAgree); if (agreementButtonVariant === undefined) { agreementButtonVariant = "primary"; } ({ disagreementButtonVariant, disagreement } = onAgree); if (disagreementButtonVariant === undefined) { disagreementButtonVariant = "secondary"; } onAgree = onAgree.onAgree; const onDisagree = onAgree.onDisagree; const modalType = onAgree.modalType; const channelId = onAgree.channelId; const guildId = onAgree.guildId; const tmp = closure_5(); const items = [modalType, channelId, guildId]; const effect = modalType.useEffect(() => { const result = AgeVerificationAnalyticsUtils.trackNsfwSpaceWarningModalViewed(modalType, channelId, guildId); }, items); const items1 = [onDisagree, modalType, channelId, guildId]; const items2 = [onAgree, modalType, channelId, guildId]; const callback = modalType.useCallback(() => { const result = AgeVerificationAnalyticsUtils.trackNsfwSpaceWarningModalClicked(AgeVerificationAnalyticsUtils.NsfwSpaceWarningModalCta.NSFW_CHANNEL_DISAGREE_CTA, modalType, channelId, guildId); if (onDisagree != null) { onDisagree(); } }, items1); let tmp5 = null; if (null != agreement) { tmp5 = null; if (null != onAgree) { const obj = { variant: agreementButtonVariant, onPress: tmp4, text: agreement }; tmp5 = channelId(onAgree(onDisagree[5]).Button, obj, "agree"); } } const tmp10 = channelId(onAgree(onDisagree[5]).Button, { variant: disagreementButtonVariant, text: disagreement, onPress: callback }, "disagree"); const obj2 = { spacing: 16, style: tmp.container, children: null }; const obj3 = { align: "center", children: null }; const items3 = [channelId(onAgree(onDisagree[7]).Text, { variant: "heading-xxl/bold", maxFontSizeMultiplier: 2, style: tmp.title, children: title }), subtitle, channelId(onAgree(onDisagree[7]).Text, { color: "text-muted", variant: "text-md/medium", style: tmp.description, maxFontSizeMultiplier: 2, children: description })]; obj3.children = items3; const items4 = [guildId(onAgree(onDisagree[6]).Stack, obj3), ]; const obj6 = { style: tmp.buttonGroup, children: null }; if ("primary" === disagreementButtonVariant) { if ("primary" !== agreementButtonVariant) { const items5 = [tmp10, tmp5]; let items6 = items5; } obj6.children = items6; items4[1] = channelId(tmp12, obj6); obj2.children = items4; return guildId(onAgree(onDisagree[6]).Stack, obj2); } items6 = [tmp5, tmp10]; };