50 lines
2.2 KiB
TypeScript
50 lines
2.2 KiB
TypeScript
// Metro module 9351 (f9352).
|
|
import { useMemo } from "react";
|
|
import { View } from "react-native";
|
|
import UserStore from "../../../stores/UserStore";
|
|
import { ContentDismissActionType } from "../../dismissible_content/DismissibleContentConstants";
|
|
import { DismissibleContent } from "../../../_bundle/Module1358";
|
|
import { createStyles } from "../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../_bundle/Module712";
|
|
import { SuperReactionIcon } from "../../../design/components/Icon/native/redesign/generated/SuperReactionIcon";
|
|
import { useStateFromStores } from "../../../_bundle/Module589";
|
|
import { isPremium } from "../../../utils/PremiumUtils";
|
|
import { useSelectedDismissibleContent } from "../../dismissible_content/hooks/useSelectedDismissibleContent";
|
|
import { intl, t } from "../../../intl/index.native";
|
|
import { useCoachmark } from "../../../design/components/Coachmark/native/useCoachmark.native";
|
|
let SUPER_REACTION_TOGGLE_EDUCATION_MOBILE, useStyles;
|
|
const EducationCoachmarkImg = function EducationCoachmarkImg() {
|
|
return <View style={useStyles().upsellImageContainer}>
|
|
<SuperReactionIcon color={Module712.colors.WHITE} size="md" />
|
|
</View>;
|
|
};
|
|
SUPER_REACTION_TOGGLE_EDUCATION_MOBILE = DismissibleContent.SUPER_REACTION_TOGGLE_EDUCATION_MOBILE;
|
|
useStyles = createStyles({
|
|
upsellImageContainer: {
|
|
backgroundColor: Module712.colors.BACKGROUND_BRAND,
|
|
borderRadius: Module712.radii.round,
|
|
height: 40,
|
|
width: 40,
|
|
display: "flex",
|
|
alignItems: "center",
|
|
justifyContent: "center"
|
|
}
|
|
});
|
|
export default function useBurstToggleCoachmark(a0) {
|
|
const r9 = isPremium(useStateFromStores([UserStore], () => UserStore.getCurrentUser())) ? [SUPER_REACTION_TOGGLE_EDUCATION_MOBILE] : [];
|
|
const [r10, r28] = useSelectedDismissibleContent(r9);
|
|
let c17170_0 = r10;
|
|
let c17170_1 = r28;
|
|
useCoachmark(a0, useMemo(() => ({
|
|
description: intl.string(t.nyYohm),
|
|
onDismiss: () => {
|
|
c17170_1(ContentDismissActionType.UNKNOWN);
|
|
},
|
|
position: "bottom",
|
|
renderImgComponent: () => <EducationCoachmarkImg />,
|
|
title: intl.string(t.ORK94p),
|
|
visible: c17170_0 === SUPER_REACTION_TOGGLE_EDUCATION_MOBILE
|
|
}), [r10, r28]));
|
|
return r28;
|
|
};
|