Files
discord-decomp/sources/modules/emojis/useTrackOpenPopout.tsx
T
2026-07-27 16:20:00 +03:00

58 lines
3.5 KiB
TypeScript

/* Metro module 8626; source: modules/emojis/useTrackOpenPopout.tsx; dependencies: [31, 1379, 1934, 1881, 661, 4863, 4594, 8530, 683, 2] */
function _fun68067(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68067, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8811:6, offset: 0x01c3d9d9, size: 197 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const env0_6 = (require(1881) /* metro dependency 1881: EmojiConstants */).EmojiInteractionPoint;
const env0_7 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/emojis/useTrackOpenPopout.tsx');
exports.useTrackOpenPopout = useTrackOpenPopout;
}
function useTrackOpenPopout({emojiId, currentGuildId, popoutData, nonce, demoMode}) { // fn#68068, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8811:275, offset: 0x01c3da9e, size: 185 bytes, params: 2, frame: 23
const binding = env0_3;
const useRef = binding.useRef;
const object2 = {guild_id: currentGuildId, emoji_id: emojiId};
const appAnalyticsUtilsModule = require(4863) /* metro dependency 4863: AppAnalyticsUtils */;
const collectChannelAnalyticsMetadata = appAnalyticsUtilsModule.collectChannelAnalyticsMetadata;
const getChannel = ChannelStore.getChannel;
const getChannelId = SelectedChannelStore.getChannelId;
copyDataProperties(object2, Reflect.apply(collectChannelAnalyticsMetadata, appAnalyticsUtilsModule,
[Reflect.apply(getChannel, ChannelStore, [Reflect.apply(getChannelId, SelectedChannelStore,
[currentGuildId])])]), currentGuildId);
const current = Reflect.apply(useRef, binding, [object2]).current;
(importDefault(4594) /* metro dependency 4594: useMountEffect */)(_fun68069);
return current;
}
function _fun68069() { // fn#68069, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8811:480, offset: 0x01c3db57, size: 166 bytes, params: 1, frame: 18
var analyticsType;
var defaultImport;
var track;
var OPEN_POPOUT;
var object2;
let value = environment.__proto__;
const value2 = undefined;
const emojiActionCreatorsModule = require(8530) /* metro dependency 8530: EmojiActionCreators */;
const initiateEmojiInteraction = emojiActionCreatorsModule.initiateEmojiInteraction;
const TrackOpenPopoutUsed = EmojiInteractionPoint.TrackOpenPopoutUsed;
Reflect.apply(initiateEmojiInteraction, emojiActionCreatorsModule, [TrackOpenPopoutUsed]);
if (!demoMode) {
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
track = defaultImport.track;
OPEN_POPOUT = AnalyticEvents.OPEN_POPOUT;
object2 = {};
analyticsType = popoutData == null ? value2 : popoutData.analyticsType;
value = analyticsType != null;
object2.type = value ? analyticsType : 'Standard Emoji Popout';
object2.nonce = nonce;
copyDataProperties(object2, current, value);
Reflect.apply(track, defaultImport, [OPEN_POPOUT, object2]);
}
return value2;
}