This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,122 @@
// Metro module 12001 (f12002).
import { useMemo } from "react";
import { View } from "react-native";
import LocaleStore from "../../../user_settings/LocaleStore";
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
import Module712 from "../../../../_bundle/Module712";
import { useTimestampTickedNow } from "../../../content_inventory/memberlist/useTimestampTickedNow";
import * as _utils from "../../../content_inventory/utils";
import { formatActiveTimestamp, formatEndedTimestamp, isEntryMarathon, getMarathonDescription, isEntryNew, getStreakCount, getTrendingType, getResurrectedEntryLastPlayTime, getEntryDuration } from "../../../content_inventory/utils";
import { Text } from "../../../../design/components/Text/native/Text";
import { useStateFromStores } from "../../../../_bundle/Module589";
import { GameControllerIcon } from "../../../../design/components/Icon/native/redesign/generated/GameControllerIcon";
import { TimerIcon } from "../../../../design/components/Icon/native/redesign/generated/TimerIcon";
import { NewUserIcon } from "../../../../design/components/Icon/native/redesign/generated/NewUserIcon";
import { intl, t } from "../../../../intl/index.native";
import { FlashIcon } from "../../../../design/components/Icon/native/redesign/generated/FlashIcon";
import { TrendingType } from "../../../../_bundle/Module12006";
import { FireIcon } from "../../../../design/components/Icon/native/redesign/generated/FireIcon";
import { RetryIcon } from "../../../../design/components/Icon/native/redesign/generated/RetryIcon";
import { TrophyIcon } from "../../../../design/components/Icon/native/redesign/generated/TrophyIcon";
import Durations from "../../../../utils/Durations";
let useStyles, ContentTimestamp, BaseBadge;
const ActiveTimestamp = function ActiveTimestamp(props) {
const { entry, style } = props;
const now = useTimestampTickedNow().now;
return <Text style={style} variant="text-sm/medium" tabularNumbers color="text-feedback-positive">
{useMemo(() => formatActiveTimestamp(entry, now), [entry, now])}
</Text>;
};
ContentTimestamp = function ContentTimestamp(props) {
const entry2 = props.entry;
const styles = useStyles();
const isEntryActive = _utils.isEntryActive(entry2);
const stateFromStores = useStateFromStores([LocaleStore], () => LocaleStore.locale);
return isEntryActive ? <ActiveTimestamp entry={entry2} /> : <Text variant="text-sm/medium" style={styles.text}>
{formatEndedTimestamp(entry2, stateFromStores)}
</Text>;
};
BaseBadge = function BaseBadge(props) {
const { Icon, iconColor, text } = props;
const styles = useStyles();
return <View style={styles.badgeContainer}>
<Icon style={styles.icon} color={iconColor} />
<Text variant="text-sm/medium" style={styles.text}>{text}</Text>
</View>;
};
useStyles = createStyles({
icon: {
width: 16,
height: 16
},
badgeContainer: {
display: "flex",
flexDirection: "row",
alignItems: "center",
gap: 4,
backgroundColor: "rgba(255, 255, 255, 0.08)",
paddingVertical: Module712.space.PX_4,
paddingLeft: Module712.space.PX_8,
paddingRight: 10,
borderRadius: Module712.radii.sm
},
text: {
color: Module712.colors.CONTENT_INVENTORY_OVERLAY_TEXT_SECONDARY
}
});
export { ActiveTimestamp };
export function GameTimestampBadge(props) {
const entry2 = props.entry;
const styles = useStyles();
return <View style={styles.badgeContainer}>
<GameControllerIcon style={styles.icon} color={_utils.isEntryActive(entry2) ? Module712.colors.STATUS_POSITIVE : Module712.colors.CONTENT_INVENTORY_OVERLAY_TEXT_SECONDARY} />
<ContentTimestamp entry={entry2} />
</View>;
}
export function MarathonBadge(props) {
const entry2 = props.entry;
if (isEntryMarathon(entry2)) {
const iconColor = _utils.isEntryActive(entry2) ? Module712.colors.STATUS_POSITIVE : Module712.colors.CONTENT_INVENTORY_OVERLAY_TEXT_SECONDARY;
const text = getMarathonDescription(entry2).text;
return text != null ? <BaseBadge Icon={TimerIcon} iconColor={iconColor} text={text} /> : null;
}
return null;
}
export function NewGameBadge(props) {
return isEntryNew(props.entry) ? <BaseBadge Icon={NewUserIcon} text={intl.string(t.keY6mW)} iconColor={Module712.colors.STATUS_POSITIVE} /> : null;
}
export function StreakBadge(props) {
const streakCount = getStreakCount(props.entry);
return streakCount == null ? null : streakCount < 2 ? null : <BaseBadge Icon={FlashIcon} text={intl.formatToPlainString(t["Klie/P"], {
days: streakCount
})} iconColor={Module712.colors.CONTENT_INVENTORY_OVERLAY_TEXT_SECONDARY} />;
}
export function TrendingBadge(props) {
const trendingType = getTrendingType(props.entry);
return trendingType == null ? null : trendingType !== TrendingType.TRENDING_TYPE_UNSPECIFIED ? <BaseBadge Icon={FireIcon} text={intl.string(t.TsWCdW)} iconColor={Module712.colors.CONTENT_INVENTORY_OVERLAY_TEXT_SECONDARY} /> : null;
}
export function ResurrectedBadge(props) {
return getResurrectedEntryLastPlayTime(props.entry) != null ? <BaseBadge Icon={RetryIcon} text={intl.string(t.adnLsB)} iconColor={Module712.colors.CONTENT_INVENTORY_OVERLAY_TEXT_SECONDARY} /> : null;
}
export function TopGameBadge(props) {
const entryDuration = getEntryDuration(props.entry);
if (entryDuration == null) {
return null;
}
const SDRHgr = t.SDRHgr;
return <BaseBadge Icon={TrophyIcon} text={<>
{intl.string(t["/50eHi"])}
{": "}
{intl.format(SDRHgr, {
hours: Math.round(entryDuration / Durations.Seconds.HOUR)
})}
</>} iconColor={Module712.colors.CONTENT_INVENTORY_OVERLAY_TEXT_SECONDARY} />;
}
export function CustomStatusTimestampBadge(props) {
const entry2 = props.entry;
const styles = useStyles();
return <View style={styles.badgeContainer}>
<TimerIcon style={styles.icon} color={Module712.colors.INTERACTIVE_TEXT_DEFAULT} />
<ContentTimestamp entry={entry2} />
</View>;
}
@@ -0,0 +1,100 @@
// Metro module 15378 (f15379).
import { useCallback } from "react";
import { View } from "react-native";
import UserStore from "../../../../stores/UserStore";
import { createICYMIStyles } from "../createICYMIStyles";
import Module712 from "../../../../_bundle/Module712";
import { isAndroid } from "../../../../utils/PlatformUtils";
import ICYMIActionCreators from "../../ICYMIActionCreators";
import showUserProfileActionSheet from "../../../user_profile/native/showUserProfileActionSheet";
import { useStateFromStores } from "../../../../_bundle/Module589";
import { PressableHighlight } from "../../../../design/void/Pressables/native/Pressables";
import { SimplePost } from "../ICYMIShared";
import { Avatar, AvatarSizes } from "../../../../design/void/native";
const styles = createICYMIStyles((a0, a1) => ({
pressable: {
marginTop: a1 ? 0 : a0.margin
},
container: {
marginHorizontal: a0.margin,
paddingBottom: a1 ? 0 : a0.margin,
paddingTop: a1 ? a0.margin : 0
},
screenshotContainer: {
marginBottom: a0.margin
},
header: {
display: "flex",
flexDirection: "row",
alignItems: "center",
gap: Module712.space.PX_12,
marginBottom: a0.margin
},
headerInfo: {
flex: 1
},
title: {
display: "flex",
flexDirection: "row",
alignItems: "center",
gap: 6,
marginBottom: isAndroid() ? -1 : 1,
marginTop: 2
},
subTitleContainer: {
flexDirection: "row",
alignItems: "center",
gap: Module712.space.PX_8
}
}));
export default function ContentInventoryEntryContainer(props) {
const { contentId, userId, children, renderForScreenshot = false, title, subtitle, type, highlight = false, onPress } = props;
const r18 = styles(renderForScreenshot);
const callback = useCallback(() => {
if (onPress != null) {
ICYMIActionCreators.itemInteracted(contentId, type, "press");
ICYMIActionCreators.feedItemActioned({
itemId: contentId,
itemType: type,
actionParameters: {
actionGestureType: "press",
actionTargetElement: "item_container",
actionIntentType: "open",
actionDestinationType: null
}
});
onPress();
} else {
ICYMIActionCreators.itemInteracted(contentId, type, "open_profile");
ICYMIActionCreators.feedItemActioned({
itemId: contentId,
itemType: type,
actionParameters: {
actionGestureType: "press",
actionTargetElement: "item_container",
actionIntentType: "open",
actionDestinationType: "user"
}
});
showUserProfileActionSheet({
userId
});
}
}, [contentId, type, userId, onPress]);
const stateFromStores = useStateFromStores([UserStore], () => UserStore.getUser(userId));
return stateFromStores != null ? <PressableHighlight unstable_pressDelay={130} onPress={callback} accessibilityRole="button" style={r18.pressable}>
<SimplePost hideDivider={renderForScreenshot} highlight={highlight}>
<View style={[r18.container, renderForScreenshot && r18.screenshotContainer]}>
<View style={r18.header}>
<Avatar key={stateFromStores.id} animate size={AvatarSizes.NORMAL} user={stateFromStores} guildId={void 0} />
<View style={r18.headerInfo}>
<View style={r18.title}>{title}</View>
<View style={r18.subTitleContainer}>{subtitle}</View>
</View>
</View>
{children}
</View>
</SimplePost>
</PressableHighlight> : null;
};
export { styles as useStyles };
@@ -0,0 +1,14 @@
// Metro module 15380 (f15381).
import { useReplyActions } from "./useReplyActions";
import ICYMICustomStatusRow from "./ICYMICustomStatusRow";
export default function CustomStatusEntryRow(props) {
const { content, renderForScreenshot, visible } = props;
const replyActions = useReplyActions({
content
});
return <ICYMICustomStatusRow id={content.id} userId={content.author_id} customStatusExtra={content.extra} renderForScreenshot={renderForScreenshot} visible={visible} variant={{
kind: "otherUserStatus",
handlePressPrimary: replyActions.openReplyActionSheet,
handlePressSecondary: replyActions.openEmojiPicker
}} />;
};
@@ -0,0 +1,210 @@
// Metro module 15371 (f15372).
import { useCallback, useMemo } from "react";
import { View } from "react-native";
import UserStore from "../../../../stores/UserStore";
import { NewGameBadge, StreakBadge, TrendingBadge, ResurrectedBadge, MarathonBadge, TopGameBadge } from "./Badges";
import { isEntryNew, getStreakCount, getTrendingType, isEntryMarathon, isEntryActive } from "../../../content_inventory/utils";
import { TrendingType } from "../../../../_bundle/Module12006";
import { createICYMIStyles } from "../createICYMIStyles";
import Module712 from "../../../../_bundle/Module712";
import { useStateFromStores } from "../../../../_bundle/Module589";
import useDisplayNameStyles from "../../../display_name_styles/hooks/useDisplayNameStyles";
import { useDisplayNameStylesFont } from "../../../display_name_styles/native/useDisplayNameStylesFont";
import { useGetOrFetchApplication } from "../../../applications/useGetOrFetchApplications";
import useHeroColors from "../../../content_inventory/memberlist/useHeroColors";
import useOpenGameProfileModal from "../../../game_profile/hooks/useOpenGameProfileModal";
import { GameProfileSources } from "../../../game_profile/GameProfileAnalyticUtils";
import { ContentInventoryEntryType } from "../../../../_bundle/Module7909";
import ICYMIActionCreators from "../../ICYMIActionCreators";
import ModalActionCreators from "../../../../actions/ModalActionCreators";
import { useReplyActions } from "./useReplyActions";
import { intl, t } from "../../../../intl/index.native";
import ContentInventoryEntryContainer from "./ContentInventoryEntryContainer";
import { Text } from "../../../../design/components/Text/native/Text";
import UserUtils from "../../../../utils/UserUtils";
import { getRelativeTimestamp } from "../../../notification_center/NotificationCenterUtils";
import SnowflakeUtils from "../../../../utils/SnowflakeUtils";
import Module689 from "../../../../_bundle/Module689";
import { PressableOpacity } from "../../../../design/void/Pressables/native/Pressables";
import FastImage from "../../../../components_native/common/FastImage";
import { ContentInventoryReplyRow } from "../ReplyRow";
let styles;
let c10923_10 = [{
Badge: NewGameBadge,
predicate: isEntryNew
}, {
Badge: StreakBadge,
predicate: (a0) => {
let r9 = getStreakCount(a0);
if (r9 == null) {
r9 = 0;
}
return r9 >= 2;
}
}, {
Badge: TrendingBadge,
predicate: (a0) => {
const trendingType = getTrendingType(a0);
return trendingType != null && trendingType !== TrendingType.TRENDING_TYPE_UNSPECIFIED;
}
}, {
Badge: ResurrectedBadge,
predicate: () => true
}, {
Badge: MarathonBadge,
predicate: (a0) => isEntryMarathon(a0) === true
}];
styles = createICYMIStyles((a0) => ({
card: {
flexDirection: "row",
gap: a0.margin,
alignItems: "center",
padding: a0.margin,
marginLeft: a0.inset,
borderRadius: Module712.radii.lg,
backgroundColor: Module712.colors.BACKGROUND_SURFACE_HIGH,
...Module712.shadows.SHADOW_HIGH
},
cardInnerContainer: {
overflow: "hidden",
flex: 1
},
image: {
width: 72,
height: 72,
borderRadius: Module712.radii.sm
},
gameName: {
maxWidth: 275,
color: Module712.colors.CONTENT_INVENTORY_OVERLAY_TEXT_PRIMARY
},
badges: {
display: "flex",
flexDirection: "row",
gap: Module712.space.PX_8,
flexWrap: "wrap",
alignItems: "center",
marginTop: 6
}
}));
export default function GamingLikeEntryRow(props) {
let c21929_2, openReplyActionSheet;
const { content, renderForScreenshot } = props;
c21929_2 = void 0;
openReplyActionSheet = void 0;
const r23 = styles();
const application_id = content.extra.application_id;
const author_id = content.author_id;
const stateFromStores = useStateFromStores([UserStore], () => UserStore.getUser(author_id));
const displayNameStylesFont = useDisplayNameStylesFont({
displayNameStyles: useDisplayNameStyles({
userId: author_id
})
});
const getOrFetchApplication = useGetOrFetchApplication(application_id);
const primaryColor = useHeroColors(getOrFetchApplication == null ? void 0 : getOrFetchApplication.getIconURL(72)).primaryColor;
const uri = getOrFetchApplication == null ? void 0 : getOrFetchApplication.getIconURL(240);
const openGameProfileModal = useOpenGameProfileModal({
location: "ICYMI Activity Card",
applicationId: application_id,
source: GameProfileSources.ActivityCard,
trackEntryPointImpression: true,
sourceUserId: author_id
});
c21929_2 = openGameProfileModal;
const callback2 = useCallback(() => {
if (c21929_2 != null) {
c21929_2();
}
}, [openGameProfileModal]);
const memo = useMemo(() => content.content_type === ContentInventoryEntryType.TOP_GAME ? [<TopGameBadge key="topgame" entry={content} />] : c10923_10.map((item) => {
const Badge = item.Badge;
return (0, item.predicate)(content) ? <Badge key={Badge.name} entry={content} /> : null;
}).filter(Boolean), [content]);
const callback = useCallback(() => {
import("../ICYMIShareModal").then(({ GameShareModal }) => {
if (GameShareModal != null) {
ICYMIActionCreators.itemInteracted(content.id, "hotwheels_gaming_activity", "press_forward");
ICYMIActionCreators.feedItemActioned({
itemId: content.id,
itemType: "hotwheels_gaming_activity",
actionParameters: {
actionGestureType: "press",
actionTargetElement: "forward_button",
actionIntentType: "share",
actionDestinationType: null
}
});
ModalActionCreators.pushLazy(() => Promise.resolve(GameShareModal), {
content
}, "GameShareModal", {
presentation: "modal"
});
}
});
}, [content]);
openReplyActionSheet = useReplyActions({
content
}).openReplyActionSheet;
const callback3 = useCallback(() => {
ICYMIActionCreators.itemInteracted(content.id, "hotwheels_gaming_activity", "press");
ICYMIActionCreators.feedItemActioned({
itemId: content.id,
itemType: "hotwheels_gaming_activity",
actionParameters: {
actionGestureType: "press",
actionTargetElement: "item_container",
actionIntentType: "open",
actionDestinationType: null
}
});
openReplyActionSheet();
}, [content, openReplyActionSheet]);
if (getOrFetchApplication != null && stateFromStores != null && uri != null) {
const r97 = isEntryActive(content) ? intl.string(t.Gk1P8Z) : intl.string(t.ktOTRQ);
const props2 = {
contentId: content.id,
userId: content.author_id,
type: "hotwheels_gaming_activity",
renderForScreenshot,
onPress: callback3,
title: <>
<Text variant="text-md/semibold" color="mobile-text-heading-primary" style={displayNameStylesFont != null ? {
fontFamily: displayNameStylesFont
} : void 0}>
{UserUtils.getName(stateFromStores)}
</Text>
<Text lineClamp={1} variant="text-xs/normal" color="text-muted">
{getRelativeTimestamp(SnowflakeUtils.extractTimestamp(content.id))}
</Text>
</>,
subtitle: <Text variant="text-sm/normal" lineClamp={1} color={isEntryActive(content) ? "status-positive" : "text-default"}>{r97}</Text>,
children: <View>
<View style={[r23.card, primaryColor != null ? {
backgroundColor: Module689(primaryColor).alpha(0.5).hex()
} : null]}>
<PressableOpacity onPress={callback2} disabled={openGameProfileModal == null} accessibilityRole="button" accessibilityLabel={intl.formatToPlainString(t["9sZWVp"], {
gameName: getOrFetchApplication.name
})}>
<FastImage source={{
uri
}} style={r23.image} />
</PressableOpacity>
<View style={r23.cardInnerContainer}>
<PressableOpacity onPress={callback2} disabled={openGameProfileModal == null} accessibilityRole="button" accessibilityLabel={intl.formatToPlainString(t["9sZWVp"], {
gameName: getOrFetchApplication.name
})}>
<Text variant="text-md/semibold" style={r23.gameName}>{getOrFetchApplication.name}</Text>
</PressableOpacity>
{memo != null && memo.length > 0 && <View style={r23.badges}>{memo}</View>}
</View>
</View>
{renderForScreenshot ? null : <ContentInventoryReplyRow reactText={intl.formatToPlainString(t.ghWi8V, {
username: UserUtils.getName(stateFromStores)
})} onReply={openReplyActionSheet} onForward={callback} />}
</View>
};
return <ContentInventoryEntryContainer {...props2} />;
}
return null;
};
@@ -0,0 +1,321 @@
// Metro module 15381 (f15382).
import { useState, useMemo } from "react";
import { View } from "react-native";
import UserStore from "../../../../stores/UserStore";
import ICYMIStore from "../../ICYMIStore";
import Module712 from "../../../../_bundle/Module712";
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
import { createICYMIStyles } from "../createICYMIStyles";
import { Icon, IconSizes } from "../../../../design/void/native";
import Module9872 from "../../../../_bundle/Module9872";
import { Text } from "../../../../design/components/Text/native/Text";
import { intl, t } from "../../../../intl/index.native";
import { useGradientBottom } from "../../../client_themes/native/ClientThemesOverrides";
import { hexWithOpacity } from "../../../../utils/ColorUtils";
import { useStateFromStores } from "../../../../_bundle/Module589";
import useDisplayNameStyles from "../../../display_name_styles/hooks/useDisplayNameStyles";
import { useDisplayNameStylesFont } from "../../../display_name_styles/native/useDisplayNameStylesFont";
import { useGameMentionsAsPlainText } from "../../../game_mentions/hooks/useGameMentionsAsPlainText";
import ActivityEmoji from "../../../activity_status/native/ActivityEmoji";
import { isAndroid } from "../../../../utils/PlatformUtils";
import { PressableHighlight } from "../../../../design/void/Pressables/native/Pressables";
import { TrashIcon } from "../../../../design/components/Icon/native/redesign/generated/TrashIcon";
import { PencilIcon } from "../../../../design/components/Icon/native/redesign/generated/PencilIcon";
import { ArrowAngleLeftUpIcon } from "../../../../design/components/Icon/native/redesign/generated/ArrowAngleLeftUpIcon";
import { ReactionIcon } from "../../../../design/components/Icon/native/redesign/generated/ReactionIcon";
import SnowflakeUtils from "../../../../utils/SnowflakeUtils";
import Durations from "../../../../utils/Durations";
import ContentInventoryEntryContainer from "./ContentInventoryEntryContainer";
import UserUtils from "../../../../utils/UserUtils";
import { getRelativeTimestamp } from "../../../notification_center/NotificationCenterUtils";
import SeparatorDot from "../SeparatorDot";
import ClipView, { CutoutShape } from "../../../../design/components/Icon/native/ClipView";
let PX_8, useStyles, styles;
const UploadPlaceholder = function UploadPlaceholder() {
return <View style={styles(false).uploadContainer}>
<Icon source={Module9872} size={IconSizes.SMALL} />
<Text variant="text-md/normal" color="text-strong">
{intl.string(t["3UB9ad"])}
</Text>
</View>;
};
PX_8 = Module712.space.PX_8;
useStyles = createStyles((a0) => ({
background: {
backgroundColor: a0,
overflow: "hidden"
}
}));
styles = createICYMIStyles((a0, a1) => ({
bubbles: {
position: "absolute",
top: a1 ? 56 : Module712.space.PX_40
},
middleBubble: {
marginLeft: 32,
borderRadius: Module712.radii.round,
height: 12,
width: 12,
overflow: "hidden"
},
bottomBubble: {
marginLeft: 44,
marginTop: -4,
borderRadius: Module712.radii.round,
height: 32,
width: 32,
overflow: "hidden"
},
title: {
display: "flex",
flexDirection: "row",
alignItems: "center",
gap: Module712.space.PX_8
},
timestamp: {
display: "flex",
flexDirection: "row",
alignItems: "center",
gap: 6
},
cardContainer: {
position: "relative",
marginLeft: a0.inset
},
card: {
gap: a0.margin,
alignItems: "center",
justifyContent: "center",
padding: a0.margin,
borderRadius: Module712.radii.lg,
width: "100%",
zIndex: 1,
marginBottom: a1 ? 0 : 17,
overflow: "hidden"
},
textOnly: {
paddingVertical: a0.margin + Module712.space.PX_12
},
emojiTextContainer: {
flexDirection: "row",
alignItems: "center",
justifyContent: "center",
gap: a0.margin
},
emojiText: {
flexShrink: 1
},
leftAlign: {
justifyContent: "flex-start"
},
uploadContainer: {
marginHorizontal: a0.margin,
marginBottom: a0.margin,
alignItems: "center",
justifyContent: "center",
minHeight: Module712.space.PX_48,
width: "100%",
borderStyle: "dashed",
borderColor: Module712.colors.BORDER_STRONG,
borderWidth: 1,
borderRadius: Module712.radii.lg,
gap: Module712.space.PX_4,
flexDirection: "row"
},
buttonIcon: {
alignItems: "center",
justifyContent: "center",
borderRadius: Module712.radii.md,
height: 28,
width: 40
}
}));
export default function GravityCustomStatusEntryRow(props) {
let r24, gameMentionsAsPlainText;
let setState;
const { id, userId, customStatusExtra, renderForScreenshot, variant } = props;
setState = void 0;
const r28 = styles(renderForScreenshot);
let c21942_4 = r28;
let r45 = useGradientBottom()?.backgroundColor;
if (r45 == null) {
r45 = Module712.colors.CARD_BACKGROUND_DEFAULT;
}
const styles2 = useStyles(r45);
const underlayColor = hexWithOpacity(styles2.background.backgroundColor, 0.6);
const stateFromStores2 = useStateFromStores([UserStore], () => UserStore.getUser(userId));
const emoji_id = customStatusExtra.emoji_id;
const id2 = (emoji_id == null ? void 0 : emoji_id.toString()) !== "0" ? customStatusExtra.emoji_id : null;
let emoji_name = customStatusExtra.emoji_name;
if (emoji_name == null) {
emoji_name = "";
}
const emoji = {
id: id2,
name: emoji_name,
animated: customStatusExtra.emoji_animated
};
const displayNameStylesFont = useDisplayNameStylesFont({
displayNameStyles: useDisplayNameStyles({
userId
})
});
let r23 = customStatusExtra.status != null && customStatusExtra.status.length > 0;
L21: {
gameMentionsAsPlainText = useGameMentionsAsPlainText(customStatusExtra.status);
if (emoji.id == null) {
const length = emoji.name.length;
r24 = null;
if (length === 0) {
break L21;
}
}
const style = {
lineHeight: isAndroid() ? 36 : 40,
fontSize: 36,
marginTop: isAndroid() ? 0 : 4
};
let animated = emoji.animated;
if (animated == null) {
animated = false;
}
r24 = <ActivityEmoji style={style} size={40} animate={animated} emoji={emoji} />;
}
const stateFromStores = useStateFromStores([UserStore], () => UserStore.getUser(userId));
let state;
[state, setState] = useState({
width: 0,
height: 0
});
const hasStatus = useMemo(() => variant.kind === "ownStatus" ? {
hasStatus: variant.hasStatus
} : {
hasStatus: true
}, [variant]).hasStatus;
const stateFromStores3 = useStateFromStores([ICYMIStore], () => {
const r5 = ICYMIStore.notificationItem();
return r5 != null && r5.id === id;
}, [id]);
const memo = useMemo(() => {
let r75;
let r2 = null;
if (!renderForScreenshot) {
if (variant.kind === "ownStatus") {
r75 = <>
<PressableHighlight onPress={variant.handlePressSecondary} underlayColor={underlayColor} style={[c21942_4.buttonIcon, styles2.background, {
position: "absolute",
right: Module712.space.PX_16,
bottom: 3
}]}>
<TrashIcon size="xs" />
</PressableHighlight>
<PressableHighlight onPress={variant.handlePressPrimary} underlayColor={underlayColor} style={[c21942_4.buttonIcon, styles2.background, {
position: "absolute",
right: Module712.space.PX_16 + 3 + PX_8 + 40,
bottom: 3
}]}>
<PencilIcon size="xs" />
</PressableHighlight>
</>;
} else {
r75 = <>
<PressableHighlight onPress={variant.handlePressPrimary} underlayColor={underlayColor} style={[c21942_4.buttonIcon, styles2.background, {
position: "absolute",
right: Module712.space.PX_16,
bottom: 3
}]}>
<ArrowAngleLeftUpIcon size="xs" />
</PressableHighlight>
<PressableHighlight onPress={variant.handlePressSecondary} underlayColor={underlayColor} style={[c21942_4.buttonIcon, styles2.background, {
position: "absolute",
right: Module712.space.PX_16 + 3 + PX_8 + 40,
bottom: 3
}]}>
<ReactionIcon size="xs" />
</PressableHighlight>
</>;
}
r2 = r75;
}
return r2;
}, [styles2.background, underlayColor, renderForScreenshot, r28.buttonIcon, variant.handlePressPrimary, variant.handlePressSecondary, variant.kind]);
if (stateFromStores2 == null) {
return null;
}
const r138 = variant.kind === "otherUserStatus" && SnowflakeUtils.age(id) < 30 * Durations.Millis.MINUTE;
const props2 = {
contentId: id,
userId,
type: "hotwheels_custom_status",
renderForScreenshot,
title: <View style={r28.title}>
<Text variant="text-md/semibold" color="mobile-text-heading-primary" style={displayNameStylesFont != null ? {
fontFamily: displayNameStylesFont
} : void 0}>
{UserUtils.getName(stateFromStores)}
</Text>
<View style={r28.timestamp}>
{hasStatus && <Text lineClamp={1} variant="text-sm/normal" color="text-muted">
{getRelativeTimestamp(SnowflakeUtils.extractTimestamp(id))}
</Text>}
{r138 ? <SeparatorDot /> : null}
{r138 ? <Text lineClamp={1} variant="text-sm/medium" color="text-brand">
{intl.string(t.tWnHcL)}
</Text> : null}
</View>
</View>,
subtitle: variant.kind === "otherUserStatus" ? <Text variant="text-sm/normal" lineClamp={1} color="text-default">
{intl.string(t.fxOLPR)}
</Text> : null,
highlight: stateFromStores3,
children: null
};
const children = [<ClipView cutouts={[]} style={r28.bubbles}>
<View style={[r28.middleBubble, styles2.background]} />
<View style={[r28.bottomBubble, styles2.background]} />
</ClipView>, ,];
const cutouts = renderForScreenshot ? [] : [{
shape: CutoutShape.RoundedRect,
x: state.width - Module712.space.PX_16 - 40 - 3,
y: state.height - 14 - 3,
width: 46,
height: 34,
cornerRadius: Module712.radii.md + 3
}, {
shape: CutoutShape.RoundedRect,
x: state.width - Module712.space.PX_16 - 86 - PX_8,
y: state.height - 14 - 3,
width: 46,
height: 34,
cornerRadius: Module712.radii.md + 3
}];
const props3 = {
onLayout: (a0) => {
setState({
width: a0.nativeEvent.layout.width,
height: a0.nativeEvent.layout.height
});
},
onPress: variant.handlePressPrimary,
underlayColor,
style: [r28.card, styles2.background, r24 == null ? r28.textOnly : null],
children: null
};
const r297 = [r24, , ,];
if (r23) {
r23 = <Text style={r28.emojiText} variant="text-md/normal">{gameMentionsAsPlainText}</Text>;
}
r297[1] = r23;
r297[2] = hasStatus ? !hasStatus : <Text variant="text-md/normal">
{intl.string(t["6ojWO0"])}
</Text>;
props3.children = [<View style={[r28.emojiTextContainer]}>{r297}</View>, hasStatus ? !hasStatus : <UploadPlaceholder />];
children[1] = <View style={r28.cardContainer}>
<ClipView cutouts={cutouts}>
<PressableHighlight {...props3} />
</ClipView>
{memo}
</View>;
props2.children = children;
return <ContentInventoryEntryContainer {...props2} />;
};
@@ -0,0 +1,365 @@
// Metro module 15377 (f15378).
import _slicedToArray from "../../../../_bundle/_slicedToArray";
import { useCallback, useState, useRef, useEffect, useMemo } from "react";
import { View } from "react-native";
import { ACTION_SHEET_MAX_WIDTH } from "../../../action_sheet/native/ActionSheetConstants";
import { EmojiIntention } from "../../../emojis/EmojiConstants";
import { jsx } from "react/jsx-runtime";
import { intl, t } from "../../../../intl/index.native";
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
import Module712 from "../../../../_bundle/Module712";
import { openEmojiPickerActionSheet } from "../../../emoji_picker/native/openEmojiPickerActionSheet";
import { ReactionTypes } from "../../../messages/MessageReactionsTypes";
import { PressableHighlight } from "../../../../design/void/Pressables/native/Pressables";
import { ReactionIcon } from "../../../../design/components/Icon/native/redesign/generated/ReactionIcon";
import { ContentInventoryEntryType } from "../../../../_bundle/Module7909";
import ICYMIActionCreators from "../../ICYMIActionCreators";
import { useFrequentlyUsedReactionEmojis } from "../../../emoji_picker/EmojiPickerUtils";
import useColorThemeBackground from "../../../client_themes/native/useColorThemeBackground";
import { useClientThemesOverride } from "../../../client_themes/native/ClientThemesOverrides";
import useWindowDimensions_native from "../../../screen/useWindowDimensions.native";
import { ActionSheet } from "../../../../design/components/Sheet/native/ActionSheet.native";
import { Text } from "../../../../design/components/Text/native/Text";
import validateOptions from "../../../../_bundle/validateOptions";
import ThemedGradient from "../../../client_themes/native/ThemedGradient";
import { OverlayOpacity } from "../../../client_themes/native/ClientThemesUtils";
import { ThemeContextProvider } from "../../../../_bundle/Module3901";
import ContentInventoryEntryRow from "../ContentInventoryEntryRow";
import FastImage from "../../../../components_native/common/FastImage";
import AvatarUtils from "../../../../utils/AvatarUtils";
import { TextInput } from "../../../../design/components/TextInput/native/TextInput.native";
import { getName } from "../../../../utils/UserUtils";
import { IconButton } from "../../../../design/components/Button/native/IconButton.native";
import { SendMessageIcon } from "../../../../design/components/Icon/native/redesign/generated/SendMessageIcon";
import LoadingIndicator from "../../../guild_role_subscriptions/native/components/LoadingIndicator";
import { ICYMIContextProvider } from "../ICYMIContext";
import { HermesBuiltin } from "../../../../_hermes/prelude";
let ReactActionSheetBase, useStyles;
let env10929 = {};
const AddEmojiButton = function AddEmojiButton(props) {
const { channel, onOpenPicker: onOpenPicker2, onPressEmoji, disabled } = props;
const styles = useStyles();
return <PressableHighlight onPress={useCallback(() => {
onOpenPicker2();
openEmojiPickerActionSheet({
pickerIntention: EmojiIntention.REACTION,
autoFocus: false,
startExpanded: false,
onPressEmoji,
channel,
reactionType: ReactionTypes.NORMAL
});
}, [channel, onPressEmoji, onOpenPicker2])} style={[styles.emoji]} accessible accessibilityLabel={intl.string(t.lfIHs4)} disabled={disabled}>
<ReactionIcon size="md" />
</PressableHighlight>;
};
ReactActionSheetBase = function ReactActionSheetBase(props) {
let r10, r13, author, channel2, content, disabled, onPressEmoji2, sendMessage, styles;
let env21939;
L5: {
env21939 = {
$parent: env10929
};
content = props.content;
env21939[0] = content;
author = props.author;
channel2 = props.channel;
onPressEmoji2 = props.onPressEmoji;
env21939[1] = onPressEmoji2;
sendMessage = props.sendMessage;
env21939[2] = sendMessage;
env21939[3] = void 0;
env21939[4] = void 0;
env21939[5] = void 0;
env21939[6] = void 0;
env21939[7] = void 0;
env21939[8] = void 0;
env21939[9] = void 0;
env21939[10] = void 0;
env21939[11] = void 0;
env21939[12] = void 0;
styles = useStyles();
env21939[3] = styles;
const r42 = _slicedToArray(useState(false), 2);
disabled = r42[0];
env21939[4] = disabled;
env21939[5] = r42[1];
r10 = "unknown";
env21939[6] = "unknown";
const r50 = intl.string(t["5IEsGx"]);
const content_type = content.content_type;
if (ContentInventoryEntryType.TOP_GAME !== content_type && ContentInventoryEntryType.PLAYED_GAME !== content_type) {
const CUSTOM_STATUS = ContentInventoryEntryType.CUSTOM_STATUS;
r13 = r50;
if (CUSTOM_STATUS !== content_type) {
break L5;
}
env21939[6] = "hotwheels_custom_status";
r13 = intl.string(t.umDRYM);
r10 = "hotwheels_custom_status";
} else {
env21939[6] = "hotwheels_gaming_activity";
r13 = intl.string(t.XC5YE5);
r10 = "hotwheels_gaming_activity";
}
}
let c21940_0;
const r84 = _slicedToArray(useState(""), 2);
const value = r84[0];
env21939[7] = value;
const onChange = r84[1];
env21939[8] = onChange;
const ref = useRef(null);
env21939[9] = ref;
const r89 = _slicedToArray(useState(null), 2);
const r90 = r89[0];
env21939[10] = r89[1];
useEffect(() => {
setTimeout(() => {
const current = env21939[9].current;
const r2 = current == null;
let r7 = void 0;
if (!r2) {
const capture = current.capture;
r7 = capture == null ? void 0 : capture.call(current).then((result) => (0, env21939[10])(result));
}
return r7;
}, 500);
}, []);
const callback = useCallback(async () => {
let c28012_0 = env21939;
(0, env21939[5])(true);
const r14 = env21939[0];
const id = r14.id;
const itemType = env21939[6];
ICYMIActionCreators.itemInteracted(id, itemType, "press_reply_send");
ICYMIActionCreators.feedItemActioned({
itemId: r14.id,
itemType,
actionParameters: {
actionGestureType: "press",
actionTargetElement: "reply_button",
actionIntentType: "reply",
actionDestinationType: null
}
});
await (0, env21939[2])(env21939[7]);
(0, env21939[5])(false);
(0, env21939[8])("");
}, [content.id, r10, value, sendMessage]);
c21940_0 = void 0;
c21940_0 = async (c30873_0) => {
let c30873_1;
c30873_1 = void 0;
(0, env21939[5])(true);
const r15 = env21939[0];
const id = r15.id;
const itemType = env21939[6];
ICYMIActionCreators.itemInteracted(id, itemType, "press_emoji_send");
ICYMIActionCreators.feedItemActioned({
itemId: r15.id,
itemType,
actionParameters: {
actionGestureType: "press",
actionTargetElement: "reaction_picker_button",
actionIntentType: "open",
actionDestinationType: null
}
});
await (0, env21939[1])(c30873_0);
(0, env21939[5])(false);
};
const callback2 = useCallback(function() {
return c21940_0.apply(this, arguments);
}, [content.id, r10, onPressEmoji2]);
env21939[11] = callback2;
const frequentlyUsedReactionEmojis = useFrequentlyUsedReactionEmojis(null);
const colorThemeBackground = useColorThemeBackground();
const clientThemesOverride = useClientThemesOverride();
const width = useWindowDimensions_native().width;
env21939[12] = width;
const memo = useMemo(() => Math.floor(Math.min(env21939[12], ACTION_SHEET_MAX_WIDTH) / 52), [width]);
const props2 = {
header: <View style={styles.header}>
<Text variant="heading-lg/semibold" color="mobile-text-heading-primary">{r13}</Text>
</View>,
children: null
};
props2.children = <View style={styles.container}>
<View style={[styles.preview, r90 == null ? styles.loading : null]}>
{jsx(validateOptions, {
ref,
options: {
fileName: "icymi_content",
format: "png",
quality: 1
},
children: <View style={styles.base}>
<ThemedGradient absolute wide tall mix mixAmount={{
dark: OverlayOpacity.LEVEL_7,
light: OverlayOpacity.LEVEL_8
}} />
<ThemeContextProvider gradient={colorThemeBackground}>
<View style={[styles.contentContainer, clientThemesOverride]}>
<ContentInventoryEntryRow content={content} renderForScreenshot />
</View>
</ThemeContextProvider>
</View>
})}
</View>
{r90 != null ? <>
<View style={[styles.emojis, disabled ? styles.submitting : null]}>
{frequentlyUsedReactionEmojis.slice(0, memo - 1).map((item) => {
let r31;
if (item.id != null) {
const r42 = env21939[3];
r31 = <PressableHighlight onPress={() => (0, env21939[11])(item)} style={r42.emoji} disabled={env21939[4]}>
<FastImage key={item.id} style={[r42.defaultEmoji, r42.emojiImage]} source={{
uri: AvatarUtils.getEmojiURL({
id: item.id,
animated: item.animated,
size: 48
})
}} />
</PressableHighlight>;
} else {
const r11 = env21939[3];
r31 = <PressableHighlight onPress={() => (0, env21939[11])(item)} style={r11.emoji} disabled={env21939[4]}>
{(0, jsx)(Text, {
variant: "text-md/medium",
color: "interactive-text-default",
style: [r11.defaultEmoji, r11.emojiText],
allowFontScaling: false,
children: item.surrogates
})}
</PressableHighlight>;
}
return r31;
})}
<AddEmojiButton onOpenPicker={() => {
const r5 = env21939[0];
const id = r5.id;
const itemType = env21939[6];
ICYMIActionCreators.itemInteracted(id, itemType, "press_reply_reaction_picker");
ICYMIActionCreators.feedItemActioned({
itemId: r5.id,
itemType,
actionParameters: {
actionGestureType: "press",
actionTargetElement: "reaction_picker_button",
actionIntentType: "open",
actionDestinationType: null
}
});
}} channel={channel2} onPressEmoji={callback2} disabled={disabled} />
</View>
<View style={styles.inputRow}>
<TextInput containerStyle={styles.input} grow isRound placeholder={intl.formatToPlainString(t.m3dK5W, {
username: getName(author)
})} value={value} onChange={onChange} isDisabled={disabled} />
<IconButton accessibilityLabel={intl.string(t.oeb1vg)} icon={<SendMessageIcon size="md" color={Module712.unsafe_rawColors.WHITE} />} size="md" onPress={callback} disabled={value.length === 0} loading={disabled} />
</View>
</> : <LoadingIndicator />}
</View>;
return <ActionSheet {...props2} />;
};
useStyles = createStyles({
header: {
width: "100%",
display: "flex",
alignItems: "center",
padding: 8
},
container: {
gap: 12
},
preview: {
borderRadius: Module712.radii.md,
overflow: "hidden",
borderWidth: 1,
borderColor: Module712.colors.BORDER_STRONG
},
loading: {
opacity: 0.5
},
base: {
position: "relative"
},
contentContainer: {
backgroundColor: Module712.colors.BACKGROUND_BASE_LOW
},
inputRow: {
flexDirection: "row",
alignItems: "center",
gap: 8
},
input: {
flex: 1,
borderRadius: Module712.radii.round
},
emojis: {
flexDirection: "row",
alignItems: "center",
justifyContent: "space-between"
},
submitting: {
opacity: 0.6
},
emoji: {
padding: 8,
borderRadius: Module712.radii.round,
backgroundColor: Module712.colors.REDESIGN_BUTTON_TERTIARY_BACKGROUND
},
defaultEmoji: {
width: 24,
height: 24
},
emojiImage: {
resizeMode: "contain",
width: 24,
height: 24
},
emojiText: {
lineHeight: 24,
fontSize: 20,
textAlign: "center",
paddingTop: 2
}
});
export default function ReactActionSheet(props) {
if (props == null) {
HermesBuiltin.throwTypeError("Cannot destructure 'undefined' or 'null'.");
throw new Error("unreachable");
}
return <ICYMIContextProvider>
<ReactActionSheetBase {...HermesBuiltin.copyDataProperties({}, props, void 0)} />
</ICYMIContextProvider>;
};
export function getStatusReplyContent({ reply, username, status, emojiStr, attachments, isForward = false }) {
let r10, r14, r25;
if (isForward) {
r14 = intl.formatToPlainString(t.S5JNyW, {
username
});
r25 = dependencyMap;
r10 = require;
} else {
r14 = intl.formatToPlainString(t.XPQgL2, {
username
});
r25 = dependencyMap;
r10 = require;
}
const r28 = [];
r28.push(`> -# *${r14}*`);
if (status.length > 0 || emojiStr.length > 0) {
r28.push(`> ${emojiStr} ${status}`);
}
if (attachments != null && attachments.length > 0) {
r28.push(`> -# *${r10(r25[7]).intl.formatToPlainString(r10(r25[7]).t["JiNPo+"], {
attachmentsCount: attachments.length
})}*`);
}
r28.push(reply);
return r28.join("\n");
}
@@ -0,0 +1,230 @@
// Metro module 15376 (f15377).
import { useEffect, useCallback } from "react";
import ChannelStore from "../../../../stores/ChannelStore";
import { DraftType } from "../../../../stores/DraftStore";
import UserStore from "../../../../stores/UserStore";
import { EmojiIntention } from "../../../emojis/EmojiConstants";
import { MessageSendLocation } from "../../../messages/MessageConstants";
import { jsx } from "react/jsx-runtime";
import { useStateFromStores } from "../../../../_bundle/Module589";
import { ContentInventoryEntryType } from "../../../../_bundle/Module7909";
import UploadAttachmentActionCreators from "../../../../actions/UploadAttachmentActionCreators";
import ChannelActionCreators from "../../../../actions/ChannelActionCreators";
import { getStatusReplyContent } from "./ReactActionSheet";
import UserUtils from "../../../../utils/UserUtils";
import MessageParser from "../../../messages/MessageParser";
import MessageActionCreators from "../../../../actions/MessageActionCreators";
import { sendMessageWithEmbed } from "../../../content_inventory/reactionUtils";
import ActionSheetActionCreators from "../../../action_sheet/native/ActionSheetActionCreators";
import ToastActionCreators from "../../../toast/native/ToastActionCreators";
import { intl, t } from "../../../../intl/index.native";
import { ChatCheckIcon } from "../../../../design/components/Icon/native/redesign/generated/ChatCheckIcon";
import ICYMIActionCreators from "../../ICYMIActionCreators";
import { openEmojiPickerActionSheet } from "../../../emoji_picker/native/openEmojiPickerActionSheet";
import { ReactionTypes } from "../../../messages/MessageReactionsTypes";
function $mk118477($env) {
return () => (0, jsx)(ChatCheckIcon, {});
}
let env10928 = {};
export function useReplyActions(a0) {
let r17, content, stateFromStores;
let env21936;
L5: {
env21936 = {
$parent: env10928
};
content = a0.content;
env21936[0] = content;
env21936[1] = void 0;
env21936[2] = void 0;
env21936[3] = void 0;
env21936[4] = void 0;
env21936[5] = void 0;
env21936[6] = void 0;
stateFromStores = useStateFromStores([UserStore], () => UserStore.getUser(env21936[0].author_id));
env21936[1] = stateFromStores;
r17 = "unknown";
env21936[2] = "unknown";
const content_type = content.content_type;
if (ContentInventoryEntryType.TOP_GAME !== content_type && ContentInventoryEntryType.PLAYED_GAME !== content_type) {
if (ContentInventoryEntryType.CUSTOM_STATUS !== content_type) {
break L5;
}
env21936[2] = "hotwheels_custom_status";
r17 = "hotwheels_custom_status";
} else {
env21936[2] = "hotwheels_gaming_activity";
r17 = "hotwheels_gaming_activity";
}
}
const stateFromStores2 = useStateFromStores([ChannelStore], () => {
const r4 = env21936[1];
if (r4 == null) {
return null;
}
return ChannelStore.getChannel(ChannelStore.getDMFromUserId(r4.id));
});
env21936[3] = stateFromStores2;
const r2 = stateFromStores2 != null;
env21936[4] = r2;
const r42 = [r2, ,];
const id = stateFromStores2?.id;
let c21937_0;
const r44 = () => {
if (env21936[4]) {
return () => {
UploadAttachmentActionCreators.clearAll(env21936[3]?.id, DraftType.ChannelMessage);
};
}
};
r42[1] = id;
useEffect(r44, r42);
c21937_0 = void 0;
c21937_0 = async (c30872_0) => {
let r205, emoji_name;
let c30872_1, c30872_2;
L15: {
let env31759;
c30872_2 = void 0;
const r10 = env31759 = {
$parent: env10928
};
c30872_1 = r10;
env31759[0] = c30872_0;
env31759[1] = void 0;
env31759[2] = void 0;
env31759[3] = void 0;
env31759[4] = void 0;
if (env21936[1] != null) {
env31759[1] = await ChannelActionCreators.getOrEnsurePrivateChannel(env21936[1].id);
env31759[2] = ChannelStore.getChannel(env31759[1]);
if (env31759[2] != null) {
if (env21936[0].content_type === ContentInventoryEntryType.CUSTOM_STATUS) {
const r125 = env21936[0].extra.emoji_name != null;
let emojiStr = "";
if (r125) {
if (env21936[0].extra.emoji_id != null) {
if (String(env21936[0].extra.emoji_id) !== "0") {
r205 = `\`:${env21936[0].extra.emoji_name}:\``;
} else {
emoji_name = env21936[0].extra.emoji_name;
r205 = `${emoji_name}`;
}
} else {
emoji_name = env21936[0].extra.emoji_name;
r205 = `${emoji_name}`;
}
emojiStr = r205;
}
env31759[3] = getStatusReplyContent({
status: env21936[0].extra.status,
emojiStr,
reply: env31759[0],
username: UserUtils.getName(env21936[1]),
attachments: env21936[0].extra.attachments
});
env31759[4] = MessageParser.parse(env31759[2], env31759[3]);
await MessageActionCreators.sendMessage(env31759[2].id, env31759[4], false, {
location: MessageSendLocation.ICYMI
});
} else {
await sendMessageWithEmbed({
channel: env31759[2],
content: env31759[0],
entry: env21936[0],
whenReady: false,
doNotNotifyOnError: false,
location: MessageSendLocation.ICYMI
});
}
}
ActionSheetActionCreators.hideActionSheet();
ToastActionCreators.open({
key: "content_inventory_message_sent",
content: intl.string(t.fjcCk5),
icon: $mk118477(env10928)
});
break L15;
}
return void 0;
}
};
const callback = useCallback(function() {
return c21937_0.apply(this, arguments);
}, [stateFromStores, content]);
env21936[5] = callback;
const callback2 = useCallback((a0) => {
const r8 = env21936[0];
const id = r8.id;
const itemType = env21936[2];
ICYMIActionCreators.itemInteracted(id, itemType, "press_emoji_send");
ICYMIActionCreators.feedItemActioned({
itemId: r8.id,
itemType,
actionParameters: {
actionGestureType: "press",
actionTargetElement: "reaction_reply_button",
actionIntentType: "react",
actionDestinationType: null
}
});
return env21936[5](a0.id != null ? `:${a0.name}:` : a0.surrogates);
}, [content.id, r17, callback]);
env21936[6] = callback2;
const callback3 = useCallback(() => {
let channel = env21936[3];
if (channel == null) {
channel = void 0;
}
openEmojiPickerActionSheet({
pickerIntention: EmojiIntention.REACTION,
autoFocus: false,
startExpanded: false,
onPressEmoji: env21936[6],
channel,
reactionType: ReactionTypes.NORMAL
});
}, [stateFromStores2, callback2]);
return {
openReplyActionSheet: useCallback(() => {
let content, itemType;
const author = env21936[1];
if (author != null) {
L5: {
content = env21936[0];
const content_type = content.content_type;
const CUSTOM_STATUS = ContentInventoryEntryType.CUSTOM_STATUS;
itemType = "hotwheels_custom_status";
if (CUSTOM_STATUS !== content_type) {
if (ContentInventoryEntryType.TOP_GAME !== content_type) {
const PLAYED_GAME = ContentInventoryEntryType.PLAYED_GAME;
itemType = "unknown";
if (PLAYED_GAME !== content_type) {
break L5;
}
}
itemType = "hotwheels_gaming_activity";
}
}
ICYMIActionCreators.itemInteracted(content.id, itemType, "press_reply_react");
ICYMIActionCreators.feedItemActioned({
itemId: content.id,
itemType,
actionParameters: {
actionGestureType: "press",
actionTargetElement: "item_container",
actionIntentType: "open",
actionDestinationType: null
}
});
ActionSheetActionCreators.openLazy(import("./ReactActionSheet"), "ReactActionSheet", {
content,
author,
sendMessage: env21936[5],
onPressEmoji: env21936[6]
});
}
}, [stateFromStores, content, callback2, callback]),
openEmojiPicker: callback3
};
}