76 lines
2.3 KiB
TypeScript
76 lines
2.3 KiB
TypeScript
// Metro module 10652 (f10653).
|
|
import { Image as Image2, View } from "react-native";
|
|
import { PRIVATE_APPS_HELP_ARTICLE } from "./Constants";
|
|
import { createStyles } from "../../design/components/Styles/native/createStyles";
|
|
import Module10653 from "../../_bundle/Module10653";
|
|
import { Text } from "../../design/components/Text/native/Text";
|
|
import { intl, t } from "../../intl/index.native";
|
|
import { Button } from "../../design/components/Button/native/Button.native";
|
|
import Linking from "../../lib/native/Linking";
|
|
import AlertActionCreators from "../../actions/AlertActionCreators";
|
|
let useStyles, LinkButton;
|
|
const ConfirmActivityGateContent = function ConfirmActivityGateContent(props) {
|
|
const application = props.application;
|
|
const styles = useStyles();
|
|
return <View style={styles.alertContainer}>
|
|
<Image2 source={Module10653} style={styles.announcementBirb} />
|
|
<Text style={styles.alertEyebrowText} variant="eyebrow">
|
|
{intl.string(t["06YebE"])}
|
|
</Text>
|
|
<Text style={styles.alertTitleText} variant="heading-lg/bold">
|
|
{intl.format(t["Z/eMDT"], {
|
|
activityName: application.name
|
|
})}
|
|
</Text>
|
|
<Text style={styles.alertSubtitleText} variant="text-sm/normal">
|
|
{intl.string(t.z81WwD)}
|
|
</Text>
|
|
</View>;
|
|
};
|
|
LinkButton = function LinkButton() {
|
|
return <View style={useStyles().linkWrapper}>
|
|
<Button variant="secondary" size="sm" onPress={function onPress() {
|
|
Linking.openURL(PRIVATE_APPS_HELP_ARTICLE);
|
|
}} text={intl.string(t.E0gf5l)} />
|
|
</View>;
|
|
};
|
|
useStyles = createStyles({
|
|
alertContainer: {
|
|
display: "flex",
|
|
alignItems: "center",
|
|
padding: 8
|
|
},
|
|
alertEyebrowText: {
|
|
marginTop: 40,
|
|
textAlign: "center"
|
|
},
|
|
alertTitleText: {
|
|
marginTop: 16,
|
|
textAlign: "center"
|
|
},
|
|
alertSubtitleText: {
|
|
marginTop: 16,
|
|
textAlign: "center"
|
|
},
|
|
announcementBirb: {
|
|
width: 90,
|
|
height: 100,
|
|
position: "absolute",
|
|
top: -66
|
|
},
|
|
linkWrapper: {
|
|
marginTop: 8
|
|
}
|
|
});
|
|
export function confirmExternalAppLaunchAlert({ application, onConfirm, onCancel }) {
|
|
return Promise.resolve(AlertActionCreators.show({
|
|
title: "",
|
|
children: <ConfirmActivityGateContent application={application} />,
|
|
onConfirm,
|
|
confirmText: intl.string(t["3PatSz"]),
|
|
onCancel,
|
|
cancelText: intl.string(t["ETE/oC"]),
|
|
footer: <LinkButton />
|
|
}));
|
|
}
|