42 lines
2.3 KiB
TypeScript
42 lines
2.3 KiB
TypeScript
// Metro module 13760 (f13761).
|
|
import { useState } from "react";
|
|
import { Image as Image2 } from "react-native";
|
|
import { ContentDismissActionType } from "../../dismissible_content/DismissibleContentConstants";
|
|
import * as _Module13761 from "../../../_bundle/Module13761";
|
|
import PasskeyUpsellActionCreators from "./PasskeyUpsellActionCreators";
|
|
import { PromoSheet } from "../../../design/components/Sheet/native/PromoSheet.native";
|
|
import { intl, t } from "../../../intl/index.native";
|
|
import { isIOS } from "../../../utils/PlatformUtils";
|
|
import PasskeyUpsellManager from "./PasskeyUpsellManager";
|
|
import { ButtonGroup } from "../../../design/components/ButtonGroup/native/ButtonGroup.native";
|
|
import { Button } from "../../../design/components/Button/native/Button.native";
|
|
import NativeCeremonies from "./NativeCeremonies";
|
|
export default function PasswordlessUpsellPromoSheet() {
|
|
const onRegisterSuccess2 = function onRegisterSuccess(a0) {
|
|
PasskeyUpsellActionCreators.closePasskeyUpsellPromoSheet();
|
|
PasskeyUpsellActionCreators.openPasskeyUpsellPromoModal(a0);
|
|
};
|
|
const illustration = <Image2 source={_Module13761} style={{
|
|
height: 190,
|
|
width: 220,
|
|
resizeMode: "contain"
|
|
}} />;
|
|
const [, setState] = useState("");
|
|
const [loading, setState2] = useState(false);
|
|
return <PromoSheet illustration={illustration} title={intl.string(t.CjleBl)} description={isIOS() ? intl.string(t["7yxR9t"]) : intl.string(t.d6uxJy)} onDismiss={() => PasskeyUpsellManager.markDismissed(ContentDismissActionType.USER_DISMISS)} actions={<ButtonGroup>
|
|
<Button size="lg" onPress={function onPress() {
|
|
PasskeyUpsellManager.markDismissed(ContentDismissActionType.TAKE_ACTION);
|
|
NativeCeremonies.registerPasskey({
|
|
setRegistering: setState2,
|
|
setError: setState,
|
|
onRegisterSuccess: onRegisterSuccess2
|
|
});
|
|
}} text={loading ? intl.string(t.wePEBF) : intl.string(t.NIFmCJ)} loading={loading} disabled={loading} />
|
|
<Button size="lg" variant="secondary" onPress={function onPress() {
|
|
PasskeyUpsellManager.markDismissed(ContentDismissActionType.USER_DISMISS);
|
|
PasskeyUpsellActionCreators.closePasskeyUpsellPromoSheet();
|
|
}} text={loading ? intl.string(t.wePEBF) : intl.string(t["7J6/nG"])} disabled={loading} />
|
|
</ButtonGroup>} />;
|
|
};
|
|
export const PASSWORDLESS_UPSELL_MODAL_KEY = "PASSWORDLESS_UPSELL_MODAL_KEY";
|