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

56 lines
2.1 KiB
TypeScript
Raw Normal View History

2026-10-10 08:08:14 +00:00
// Module ID: 9543
// Function ID: 9544
2026-07-20 16:05:17 +00:00
// Name: useTrackOpenPopout
2026-10-10 08:08:14 +00:00
// Dependencies: [19, 2065, 2116, 1393, 1085, 5107, 5396, 9427, 1265, 2]
2026-07-20 16:05:17 +00:00
// Exports: useTrackOpenPopout
2026-10-10 08:08:14 +00:00
// Module 9543 (useTrackOpenPopout)
2026-10-03 08:58:59 +00:00
import Constants from "Constants" /* 1085 */;
2026-10-09 10:00:15 +00:00
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1265 */;
import EmojiConstants from "EmojiConstants" /* 1393 */;
2026-10-10 08:08:14 +00:00
import AppAnalyticsUtils from "AppAnalyticsUtils" /* 5107 */;
import useMountEffectDefault from "useMountEffect" /* 5396 */;
import emojis_EmojiActionCreators from "emojis/EmojiActionCreators" /* 9427 */;
2026-10-03 08:58:59 +00:00
import react from "react" /* 19 */;
2026-10-10 08:08:14 +00:00
import ChannelStore from "ChannelStore" /* 2065 */;
import SelectedChannelStore from "SelectedChannelStore" /* 2116 */;
2026-10-03 08:58:59 +00:00
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-10-03 08:58:59 +00:00
const EmojiInteractionPoint = EmojiConstants.EmojiInteractionPoint;
const AnalyticEvents = Constants.AnalyticEvents;
let result = size.fileFinishedImporting("modules/emojis/useTrackOpenPopout.tsx");
2026-07-20 16:05:17 +00:00
export const useTrackOpenPopout = (emojiId) => {
2026-10-03 08:58:59 +00:00
let analyticsType;
let currentGuildId;
let nonce;
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;
2026-10-03 08:58:59 +00:00
let obj = { guild_id: currentGuildId, emoji_id: emojiId.emojiId };
const useRef = current.useRef;
let obj2 = AppAnalyticsUtils;
let merged = Object.assign(obj2.collectChannelAnalyticsMetadata(ChannelStore.getChannel(SelectedChannelStore.getChannelId(currentGuildId))));
current = useRef(obj).current;
useMountEffectDefault(() => {
2026-10-03 08:58:59 +00:00
const obj = emojis_EmojiActionCreators;
const result = obj.initiateEmojiInteraction(EmojiInteractionPoint.TrackOpenPopoutUsed);
const tmp3 = dependencyMap;
if (!tmp3) {
2026-07-29 08:29:29 +00:00
let str;
2026-10-03 08:58:59 +00:00
const track = AnalyticsUtilsDefault.track;
const OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
AnalyticsUtilsDefault;
if (require != null) {
str = require.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
}
2026-10-03 08:58:59 +00:00
const obj2 = { type: str, nonce: importDefault };
2026-07-20 16:05:17 +00:00
const merged = Object.assign(current);
2026-10-03 08:58:59 +00:00
track(OPEN_POPOUT, obj2);
2026-07-20 16:05:17 +00:00
}
});
return current;
};