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

56 lines
2.1 KiB
TypeScript
Raw Normal View History

2026-10-08 09:57:35 +00:00
// Module ID: 9476
// Function ID: 9477
2026-07-20 16:05:17 +00:00
// Name: useTrackOpenPopout
2026-10-08 09:57:35 +00:00
// Dependencies: [19, 2063, 2115, 1392, 1085, 5105, 5392, 9360, 1264, 2]
2026-07-20 16:05:17 +00:00
// Exports: useTrackOpenPopout
2026-10-08 09:57:35 +00:00
// Module 9476 (useTrackOpenPopout)
2026-10-03 08:58:59 +00:00
import Constants from "Constants" /* 1085 */;
2026-10-08 09:57:35 +00:00
import AnalyticsUtilsDefault from "AnalyticsUtils" /* 1264 */;
import EmojiConstants from "EmojiConstants" /* 1392 */;
import AppAnalyticsUtils from "AppAnalyticsUtils" /* 5105 */;
import useMountEffectDefault from "useMountEffect" /* 5392 */;
import emojis_EmojiActionCreators from "emojis/EmojiActionCreators" /* 9360 */;
2026-10-03 08:58:59 +00:00
import react from "react" /* 19 */;
2026-10-08 09:57:35 +00:00
import ChannelStore from "ChannelStore" /* 2063 */;
import SelectedChannelStore from "SelectedChannelStore" /* 2115 */;
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;
};