58 lines
2.2 KiB
TypeScript
58 lines
2.2 KiB
TypeScript
// Metro module 10124 (f10125).
|
|
import { useRef, useMemo, useCallback } from "react";
|
|
import { View } from "react-native";
|
|
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 { Text } from "../../../../design/components/Text/native/Text";
|
|
import { intl, t } from "../../../../intl/index.native";
|
|
import { useSelectedDismissibleContent } from "../../../dismissible_content/hooks/useSelectedDismissibleContent";
|
|
import { useCoachmark } from "../../../../design/components/Coachmark/native/useCoachmark.native";
|
|
let TOPICAL_NAVIGATION_HEADER_COACHMARK, c6741_8, useStyles;
|
|
const NewBadge = function NewBadge() {
|
|
return <View style={useStyles().badge}>
|
|
<Text variant="text-sm/bold" color="text-default">
|
|
{intl.string(t.c2GSIl)}
|
|
</Text>
|
|
</View>;
|
|
};
|
|
TOPICAL_NAVIGATION_HEADER_COACHMARK = DismissibleContent.TOPICAL_NAVIGATION_HEADER_COACHMARK;
|
|
c6741_8 = [TOPICAL_NAVIGATION_HEADER_COACHMARK];
|
|
useStyles = createStyles({
|
|
badge: {
|
|
backgroundColor: Module712.colors.BACKGROUND_BRAND,
|
|
paddingVertical: 2,
|
|
paddingHorizontal: Module712.space.PX_8,
|
|
borderRadius: Module712.radii.round
|
|
},
|
|
coachmarkWrapper: {
|
|
marginRight: Module712.space.PX_12
|
|
}
|
|
});
|
|
export function ConversationCoachmark(props) {
|
|
const { children, isLast } = props;
|
|
const styles = useStyles();
|
|
const ref = useRef(null);
|
|
const [r23, r24] = useSelectedDismissibleContent(c6741_8);
|
|
let c17714_0 = r23;
|
|
let c17714_1 = r24;
|
|
useCoachmark(ref, useMemo(() => ({
|
|
title: intl.string(t.UcQjDe),
|
|
description: intl.string(t.QeJIbA),
|
|
position: "bottom",
|
|
visible: c17714_0 === TOPICAL_NAVIGATION_HEADER_COACHMARK,
|
|
onDismiss: () => {
|
|
c17714_1(ContentDismissActionType.USER_DISMISS);
|
|
},
|
|
renderImgComponent: () => <NewBadge />
|
|
}), [r24, r23]));
|
|
return <View style={isLast ? void 0 : styles.coachmarkWrapper}>
|
|
<View ref={ref}>
|
|
{children(useCallback(() => {
|
|
c17714_1(ContentDismissActionType.USER_DISMISS);
|
|
}, [r24]))}
|
|
</View>
|
|
</View>;
|
|
}
|