decord/alpha/source/modules/emojis/useTrackOpenPopout.tsx

44 lines
1.8 KiB
TypeScript
Raw Normal View History

// Module ID: 9986
// Function ID: 9987
2026-07-20 16:05:17 +00:00
// Name: useTrackOpenPopout
// Dependencies: [19, 2044, 2098, 1375, 1074, 5025, 5482, 9987, 1241, 2]
2026-07-20 16:05:17 +00:00
// Exports: useTrackOpenPopout
// Module 9986 (useTrackOpenPopout)
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1241 */;
import AppAnalyticsUtils from "AppAnalyticsUtils" /* 5025 */;
import useMountEffectDefault from "useMountEffect" /* 5482 */;
import emojis_EmojiActionCreators from "emojis/EmojiActionCreators" /* 9987 */;
import noop from "module_19" /* 19 */;
import ChannelStore from "ChannelStore" /* 2044 */;
import SelectedChannelStore from "SelectedChannelStore" /* 2098 */;
2026-07-23 10:11:24 +00:00
require = fn;
const EmojiInteractionPoint = fn(1375).EmojiInteractionPoint;
const AnalyticEvents = fn(1074).AnalyticEvents;
const size = fn(2);
let result = size.fileFinishedImporting("modules/emojis/useTrackOpenPopout.tsx");
2026-07-20 16:05:17 +00:00
export const useTrackOpenPopout = (emojiId) => {
2026-07-23 10:11:24 +00:00
({ currentGuildId, popoutData: require, nonce: importDefault, demoMode: dependencyMap } = emojiId);
2026-07-29 08:29:29 +00:00
let current;
let merged = Object.assign(AppAnalyticsUtils.collectChannelAnalyticsMetadata(ChannelStore.getChannel(SelectedChannelStore.getChannelId(currentGuildId))));
2026-07-23 10:11:24 +00:00
current = current.useRef({ guild_id: currentGuildId, emoji_id: emojiId.emojiId }).current;
useMountEffectDefault(() => {
const result = emojis_EmojiActionCreators.initiateEmojiInteraction(EmojiInteractionPoint.TrackOpenPopoutUsed);
if (!dependencyMap) {
2026-07-29 08:29:29 +00:00
let str;
if (analyticsType != null) {
str = analyticsType.analyticsType;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (str == null) {
str = "Standard Emoji Popout";
2026-07-20 16:05:17 +00:00
}
const obj3 = { type: str, nonce };
2026-07-20 16:05:17 +00:00
const merged = Object.assign(current);
AnalyticsUtilsDefault.track(AnalyticEvents.OPEN_POPOUT, obj3);
2026-07-20 16:05:17 +00:00
}
});
return current;
};