/* Metro module 13394; source: modules/parent_tools/native/FamilyCenterModalQRCode.tsx; dependencies: [57, 31, 27, 5117, 661, 33, 4501, 697, 8171, 8170, 3856, 1244, 5080, 12624, 44, 4594, 683, 6258, 6259, 1305, 11785, 4573, 2224, 6766, 5278, 9181, 10120, 6261, 4578, 5282, 10121, 2] */ import Module00044 from '../../../by-id/module-00044.js'; /* Metro dependency 44 */ import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */ import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */ import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */ import UseIsInAdultAgeGroup from '../hooks/useIsInAdultAgeGroup.tsx'; /* Metro dependency 8171 */ import Module11785 from '../../../by-id/module-11785.js'; /* Metro dependency 11785 */ import * as FileImportTrackerModule from '../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ReactNativeModule from '../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */ import * as ReactModule from '../../../by-id/module-00031-React.js'; /* Metro dependency 31 */ import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */ import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */ import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */ import * as ToastUtilsModule from '../../toast/native/ToastUtils.tsx'; /* Metro dependency 3856 */ 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 FamilyCenterConstantsModule from '../FamilyCenterConstants.tsx'; /* Metro dependency 5117 */ import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */ import * as ModalScreenNativeModule from '../../../design/components/Modal/native/ModalScreen.native.tsx'; /* Metro dependency 6258 */ import * as ModalContentNativeModule from '../../../design/components/Modal/native/ModalContent.native.tsx'; /* Metro dependency 6259 */ import * as ButtonGroupNativeModule from '../../../design/components/ButtonGroup/native/ButtonGroup.native.tsx'; /* Metro dependency 6261 */ import * as TextWithIOSLinkWorkaroundModule from '../../a11y/native/TextWithIOSLinkWorkaround.tsx'; /* Metro dependency 6766 */ import * as UseUserLinksModule from '../hooks/useUserLinks.tsx'; /* Metro dependency 8170 */ import * as QRCodeModule from '../../../components_native/QRCode.tsx'; /* Metro dependency 9181 */ import * as ModalFooterNativeModule from '../../../design/components/Modal/native/ModalFooter.native.tsx'; /* Metro dependency 10120 */ import * as ModalNativeModule from '../../../design/components/Modal/native/Modal.native.tsx'; /* Metro dependency 10121 */ import * as UseFamilyCenterActionsModule from '../hooks/useFamilyCenterActions.tsx'; /* Metro dependency 12624 */ function _fun101968(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101968, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13584:6, offset: 0x02225af1, size: 563 bytes, params: 8, frame: 24 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = FamilyCenterConstantsModule; const env0_6 = value.FamilyCenterAction; const env0_7 = value.PLACEHOLDER_QR_CODE_URL; const env0_8 = value.QR_CODE_AUTO_HIDE_TIMEOUT; value = require(33) /* metro dependency 33 */; const env0_10 = value.jsx; const env0_11 = value.jsxs; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; object = {}; const MESSAGE_MENTIONED_BACKGROUND_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.MESSAGE_MENTIONED_BACKGROUND_DEFAULT; object.noticeContainer = {'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center', 'justifyContent': 'center', 'backgroundColor': null, 'padding': 12, 'marginBottom': 24, 'marginHorizontal': -16, backgroundColor: MESSAGE_MENTIONED_BACKGROUND_DEFAULT}; const object3 = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', 'backgroundColor': null, 'marginRight': 8, 'width': 18, 'height': 18}; let STATUS_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_WARNING; object3.backgroundColor = STATUS_WARNING; object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round; object.noticeIconCircle = object3; const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW; object.noticeIcon = {'width': 11, 'height': 11, tintColor: BACKGROUND_BASE_LOW}; STATUS_WARNING = (importDefault(697) /* metro dependency 697: native */).colors.STATUS_WARNING; object.noticeText = {color: STATUS_WARNING}; object.header = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', 'textAlign': 'center', 'marginBottom': 16}; object.headerText = {marginBottom: 4}; object.description = {textAlign: 'center'}; object.reminder = {'marginTop': 16, 'textAlign': 'center'}; object.qrCode = {'display': 'flex', 'flexDirection': 'row', 'justifyContent': 'center', 'alignItems': 'center'}; const env0_12 = Reflect.apply(createStyles, value, [object]); (FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/native/FamilyCenterModalQRCode.tsx'); exports.default = FamilyCenterModalQRCode; function FamilyCenterModalQRCodeScreen() { // fn#101969, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13584:1124, offset: 0x02225d24, size: 1502 bytes, params: 1, frame: 40 const styles = useStyles(); const value2 = (UseIsInAdultAgeGroup)(); const [property, env0_1] = Module00057(getLinkCode.useState(false), 2); const value5 = (UseUserLinksModule).usePendingRequestCount(); const value6 = getLinkCode.useRef(value5); const value8 = (UseFamilyCenterActionsModule).useFamilyCenterActions({onError: getLinkCode.useCallback(_fun101970, [])}); var getLinkCode = value8.getLinkCode; const isGetLinkCodeLoading = value8.isGetLinkCodeLoading; const value9 = (UseUserLinksModule).useUserQRLinkUrl(); (Module00044)(!value2, 'FamilyCenterQRCodeModal should only be rendered for teens.'); (importDefault(4594) /* metro dependency 4594: useMountEffect */)(function() { getLinkCode(); }); getLinkCode.useEffect(_fun101972, [value6, value5]); const value10 = getLinkCode.useCallback(_fun101973, [property]); const ModalScreen = (ModalScreenNativeModule).ModalScreen; const ModalContent = (ModalContentNativeModule).ModalContent; const Icon = (NativeModule).Icon; const view = ( ); const Text = (TextModule).Text; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; let string = intl.string; const items2 = [ {view} {Reflect.apply(string, intl, [(importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).iHYMAz])} , ]; string = intl.string; const AVTZaN = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).AVTZaN; const text = ( {Reflect.apply(string, intl, [AVTZaN])} ); const TextWithIOSLinkWorkaround = (TextWithIOSLinkWorkaroundModule).TextWithIOSLinkWorkaround; const format = intl.format; const LyyCsE = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).LyyCsE; items2[1] = ( {text} {Reflect.apply(format, intl, [LyyCsE, {link: 'https://support.discord.com/hc/articles/14155060633623'}])} ); const PressableOpacity = (PressablesModule).PressableOpacity; const QRCodeWithOverlay = (QRCodeModule).QRCodeWithOverlay; const r11 = property ? isGetLinkCodeLoading ? PLACEHOLDER_QR_CODE_URL : value9 ?? PLACEHOLDER_QR_CODE_URL : PLACEHOLDER_QR_CODE_URL; const QRCodeOverlaySizes = (QRCodeModule).QRCodeOverlaySizes; const SIZE_60 = QRCodeOverlaySizes.SIZE_60; items2[2] = ( ); items2[3] = ( {intl.string((importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).goDyoe)} ); const modalContent = ( {items2} ); const ModalFooter = (ModalFooterNativeModule).ModalFooter; const ButtonGroup = (ButtonGroupNativeModule).ButtonGroup; const Button = (ButtonNativeModule).Button; string = intl.string; const defaultImport3 = importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */; return ( {modalContent}