59 lines
1.8 KiB
TypeScript
59 lines
1.8 KiB
TypeScript
// Metro module 8428 (f8429).
|
|
import { useMemo } from "react";
|
|
import { Image as Image2, View } from "react-native";
|
|
import { createStyles } from "../../../design/components/Styles/native/createStyles";
|
|
import Module8429 from "../../../_bundle/Module8429";
|
|
import { intl, t } from "../../../intl/index.native";
|
|
import { getRootNavigationRef } from "../../main_tabs_v2/RootNavigationRef.native";
|
|
import { useCoachmark } from "../../../design/components/Coachmark/native/useCoachmark.native";
|
|
let useStyles;
|
|
const OrbsBadgeCoachmarkImg = function OrbsBadgeCoachmarkImg() {
|
|
const styles2 = useStyles();
|
|
return <View style={styles2.coachmarkImageContainer}>
|
|
<Image2 source={{
|
|
uri: Module8429
|
|
}} style={styles2.coachmarkImage} />
|
|
</View>;
|
|
};
|
|
useStyles = createStyles({
|
|
coachmarkImageContainer: {
|
|
alignItems: "center",
|
|
justifyContent: "center"
|
|
},
|
|
coachmarkImage: {
|
|
width: 80,
|
|
height: 80
|
|
},
|
|
coachmarkDescription: {
|
|
marginBottom: -10
|
|
}
|
|
});
|
|
export default function OrbsBadgeCoachmark(a0) {
|
|
const { badgeRef, ...rest } = a0;
|
|
useCoachmark(a0.badgeRef, rest);
|
|
return null;
|
|
};
|
|
export function useOrbsBadgeCoachmark({ disabled }) {
|
|
const styles = useStyles();
|
|
const memo = useMemo(() => ({
|
|
title: intl.string(t["4ivm+P"]),
|
|
description: <View style={styles.coachmarkDescription} />,
|
|
position: "bottom",
|
|
visible: !disabled,
|
|
onDismiss: () => {
|
|
const rootNavigationRef = getRootNavigationRef();
|
|
if (rootNavigationRef != null && rootNavigationRef.isReady()) {
|
|
rootNavigationRef.setParams({
|
|
showOrbsBadgeCoachmark: void 0
|
|
});
|
|
return void 0;
|
|
}
|
|
return false;
|
|
},
|
|
renderImgComponent: () => <OrbsBadgeCoachmarkImg />
|
|
}), [disabled, styles.coachmarkDescription]);
|
|
return disabled ? null : {
|
|
props: memo
|
|
};
|
|
}
|