115 lines
7.1 KiB
TypeScript
115 lines
7.1 KiB
TypeScript
/* Metro module 13252; source: modules/webauthn/native/PasskeyUpsellPromoSheet.tsx; dependencies: [57, 31, 27, 1376, 33, 13253, 13250, 12765, 1244, 477, 13249, 6261, 4578, 8978, 2] */
|
|
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
|
|
import NativeCeremonies from './NativeCeremonies.tsx'; /* Metro dependency 8978 */
|
|
import PasskeyUpsellManager from './PasskeyUpsellManager.tsx'; /* Metro dependency 13249 */
|
|
import PasskeyUpsellActionCreators from './PasskeyUpsellActionCreators.tsx'; /* Metro dependency 13250 */
|
|
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 PlatformUtilsModule from '../../../utils/PlatformUtils.tsx'; /* Metro dependency 477 */
|
|
import * as IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
|
|
import * as DismissibleContentConstantsModule from '../../dismissible_content/DismissibleContentConstants.tsx'; /* Metro dependency 1376 */
|
|
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 */
|
|
import * as PromoSheetNativeModule from '../../../design/components/Sheet/native/PromoSheet.native.tsx'; /* Metro dependency 12765 */
|
|
import * as Module13253Module from '../../../by-id/module-13253.js'; /* Metro dependency 13253 */
|
|
|
|
function _fun101061(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#101061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13442:6, offset: 0x02206928, size: 225 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/webauthn/native/PasskeyUpsellPromoSheet.tsx');
|
|
exports.default = PasswordlessUpsellPromoSheet;
|
|
exports.PASSWORDLESS_UPSELL_MODAL_KEY = 'PASSWORDLESS_UPSELL_MODAL_KEY';
|
|
function PasswordlessUpsellPromoSheet() { // fn#101062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13442:290, offset: 0x02206a09, size: 665 bytes, params: 1, frame: 29
|
|
const image = (
|
|
<Image
|
|
source={Module13253Module}
|
|
style={{
|
|
'height': 190,
|
|
'width': 220,
|
|
'resizeMode': 'contain',
|
|
}}
|
|
/>
|
|
);
|
|
let useState = ReactModule.useState;
|
|
const value3 = Reflect.apply(useState, ReactModule, ['']);
|
|
const value4 = Module00057(value3, 2);
|
|
value4[0];
|
|
const env0_0 = value4[1];
|
|
useState = ReactModule.useState;
|
|
const value5 = Module00057(Reflect.apply(useState, ReactModule, [false]), 2);
|
|
const property = value5[0];
|
|
const env0_1 = value5[1];
|
|
const PromoSheet = (PromoSheetNativeModule).PromoSheet;
|
|
object = {illustration: image};
|
|
const intl = (IndexNativeModule).intl;
|
|
let string = intl.string;
|
|
const t = (IndexNativeModule).t;
|
|
const CjleBl = t.CjleBl;
|
|
object.title = Reflect.apply(string, intl, [CjleBl]);
|
|
const isIOS2 = (PlatformUtilsModule).isIOS();
|
|
string = intl.string;
|
|
object.description = isIOS2 ? Reflect.apply(string, intl, [t['7yxR9t']]) : Reflect.apply(string, intl, [t.d6uxJy]);
|
|
object.onDismiss = function() {
|
|
return importDefault(dependencyMap[10]).markDismissed(ContentDismissActionType.USER_DISMISS);
|
|
};
|
|
const ButtonGroup = (ButtonGroupNativeModule).ButtonGroup;
|
|
const Button = (ButtonNativeModule).Button;
|
|
string = intl.string;
|
|
const button = (
|
|
<Button
|
|
size="lg"
|
|
onPress={onPress_101065}
|
|
text={property ? Reflect.apply(string, intl, [t.wePEBF]) : Reflect.apply(string, intl, [t.NIFmCJ])}
|
|
loading={property}
|
|
disabled={property}
|
|
/>
|
|
);
|
|
string = intl.string;
|
|
object.actions = (
|
|
<ButtonGroup>
|
|
{button}
|
|
<Button
|
|
size="lg"
|
|
variant="secondary"
|
|
onPress={onPress_101066}
|
|
text={property ? Reflect.apply(string, intl, [t.wePEBF]) : Reflect.apply(string, intl, [t['7J6/nG']])}
|
|
disabled={property}
|
|
/>
|
|
</ButtonGroup>
|
|
);
|
|
return <PromoSheet {...object} />;
|
|
function PasswordlessUpsellPromoSheetOnRegisterSuccess(a0) { // fn#101063, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13442:506, owner: PasswordlessUpsellPromoSheet.onRegisterSuccess, offset: 0x02206ca2, size: 60 bytes, params: 2, frame: 14
|
|
const value = environment.__proto__;
|
|
(PasskeyUpsellActionCreators).closePasskeyUpsellPromoSheet();
|
|
(PasskeyUpsellActionCreators).openPasskeyUpsellPromoModal(a0);
|
|
}
|
|
|
|
function PasswordlessUpsellPromoSheetOnPress() { // fn#101065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13442:916, owner: PasswordlessUpsellPromoSheet.onPress, offset: 0x02206d0e, size: 103 bytes, params: 1, frame: 14
|
|
const value = environment.__proto__;
|
|
const defaultImport = PasskeyUpsellManager;
|
|
const markDismissed = defaultImport.markDismissed;
|
|
const TAKE_ACTION = ContentDismissActionType.TAKE_ACTION;
|
|
Reflect.apply(markDismissed, defaultImport, [TAKE_ACTION]);
|
|
(NativeCeremonies).registerPasskey({setRegistering: env0_1,
|
|
setError: env0_0, onRegisterSuccess: PasswordlessUpsellPromoSheetOnRegisterSuccess});
|
|
}
|
|
|
|
function PasswordlessUpsellPromoSheetOnPress_101066() { // fn#101066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13442:1215, owner: PasswordlessUpsellPromoSheet.onPress, offset: 0x02206d75, size: 70 bytes, params: 1, frame: 14
|
|
const value = environment.__proto__;
|
|
const defaultImport = PasskeyUpsellManager;
|
|
const markDismissed = defaultImport.markDismissed;
|
|
const USER_DISMISS = ContentDismissActionType.USER_DISMISS;
|
|
Reflect.apply(markDismissed, defaultImport, [USER_DISMISS]);
|
|
(PasskeyUpsellActionCreators).closePasskeyUpsellPromoSheet();
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun101061, 13252, [57, 31, 27, 1376, 33, 13253, 13250, 12765, 1244, 477, 13249, 6261, 4578, 8978,
|
|
2]) /* metro module 13252, dependencies: [57, 31, 27, 1376, 33, 13253, 13250, 12765, 1244, 477, 13249, 6261, 4578, 8978, 2] */;
|