/* Metro module 15800; source: modules/parent_tools/native/ConnectGuardianCard.tsx; dependencies: [31, 27, 1878, 5117, 33, 4501, 697, 632, 8994, 7054, 1244, 2224, 4572, 9181, 4573, 4690, 2] */ import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */ import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */ import FamilyCenterMessages from '../FamilyCenter.messages.js'; /* Metro dependency 2224 */ import UseCountdown from '../../../hooks/useCountdown.tsx'; /* Metro dependency 7054 */ import UseStableCallback from '../../../hooks/useStableCallback.tsx'; /* Metro dependency 8994 */ 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 JsxRuntimeModule from '../../../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */ import * as UseStateFromStoresModule from '../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */ import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */ 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 TimeUtilsModule from '../../../utils/native/TimeUtils.tsx'; /* Metro dependency 4690 */ import * as FamilyCenterConstantsModule from '../FamilyCenterConstants.tsx'; /* Metro dependency 5117 */ import * as QRCodeModule from '../../../components_native/QRCode.tsx'; /* Metro dependency 9181 */ function _fun121393(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121393, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16008:6, offset: 0x025470c3, size: 341 bytes, params: 8, frame: 23 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = JsxRuntimeModule; const env0_7 = value.jsx; const env0_8 = value.jsxs; value = require(4501) /* metro dependency 4501: createStyles */; const createStyles = value.createStyles; const object2 = {}; const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12; object2.padding = PX_12; object2.borderWidth = 1; object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg; const BORDER_NORMAL = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_NORMAL; object2.borderColor = BORDER_NORMAL; const env0_9 = Reflect.apply(createStyles, value, [{card: object2, countdown: {textAlign: 'center'}}]); (FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/native/ConnectGuardianCard.tsx'); exports.ConnectGuardianCard = ConnectGuardianCard; function ConnectGuardianCard({linkCode, expiresAt, onRefresh}) { // fn#121394, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16008:487, offset: 0x02547218, size: 562 bytes, params: 2, frame: 30 var environment; let value = environment; const styles = useStyles(); const value2 = (UseStateFromStoresModule).useStateFromStores([UserStore], _fun121395); const value3 = (UseStableCallback)(onRefresh); const {days, hours, minutes, seconds} = (UseCountdown)(expiresAt); ReactModule.useEffect(_fun121396, [expiresAt, value3]); if (value2 == null) { return null; } const value5 = FAMILY_CENTER_REQUEST_QR_CODE_URL(value2, linkCode); const intl = (IndexNativeModule).intl; const string = intl.string; const RfkLDs = (FamilyCenterMessages).RfkLDs; const value6 = Reflect.apply(string, intl, [RfkLDs]); const Stack = (StackNativeModule).Stack; const PX_8 = (Native).space.PX_8; const QRCodeWithOverlay = (QRCodeModule).QRCodeWithOverlay; const items2 = [ , ]; const Text = (TextModule).Text; const getTimeFormat = (TimeUtilsModule).getTimeFormat; value = Reflect.apply(getTimeFormat, value, [86400 * days + 3600 * hours + 60 * minutes + seconds]); items2[1] = ( {'' + value6 + ' ' + value} ); return ( {items2} ); function _fun121395() { // fn#121395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16008:598, offset: 0x0254744a, size: 34 bytes, params: 1, frame: 10 const value = environment.__proto__; return UserStore.getCurrentUser()?.id; } function _fun121396() { // fn#121396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16008:745, offset: 0x0254746c, size: 79 bytes, params: 1, frame: 15 const expiresAtBinding = expiresAt; const Date = global.Date; const value2 = expiresAtBinding - Date.now(); if (value2 <= 0) { env0_1(); return undefined; } const env0_0 = global.setTimeout(env0_1, value2); return _fun121397; function _fun121397() { // fn#121397, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16008:809, offset: 0x016d7e7e, size: 24 bytes, params: 1, frame: 11 return global.clearTimeout(env0_0); } } } } global.__d(_fun121393, 15800, [31, 27, 1878, 5117, 33, 4501, 697, 632, 8994, 7054, 1244, 2224, 4572, 9181, 4573, 4690, 2]) /* metro module 15800, dependencies: [31, 27, 1878, 5117, 33, 4501, 697, 632, 8994, 7054, 1244, 2224, 4572, 9181, 4573, 4690, 2] */;