Files
discord-decomp/sources/modules/emojis/useTrackOpenPopout.tsx
T
2026-07-28 01:06:53 +03:00

64 lines
4.2 KiB
TypeScript

/* Metro module 8626; source: modules/emojis/useTrackOpenPopout.tsx; dependencies: [31, 1379, 1934, 1881, 661, 4863, 4594, 8530, 683, 2] */
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import SelectedChannelStore from '../../stores/SelectedChannelStore.tsx'; /* Metro dependency 1934 */
import UseMountEffect from '../../hooks/useMountEffect.tsx'; /* Metro dependency 4594 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
import * as ConstantsModule from '../../Constants.tsx'; /* Metro dependency 661 */
import * as EmojiConstantsModule from './EmojiConstants.tsx'; /* Metro dependency 1881 */
import * as AppAnalyticsUtilsModule from '../app_analytics/AppAnalyticsUtils.tsx'; /* Metro dependency 4863 */
import * as EmojiActionCreatorsModule from './EmojiActionCreators.tsx'; /* Metro dependency 8530 */
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});
(FileImportTrackerModule).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 useRef = ReactModule.useRef;
const object = {guild_id: currentGuildId, emoji_id: emojiId};
const collectChannelAnalyticsMetadata = AppAnalyticsUtilsModule.collectChannelAnalyticsMetadata;
const channelStoreBinding = ChannelStore;
const getChannel = channelStoreBinding.getChannel;
const selectedChannelStoreBinding = SelectedChannelStore;
const getChannelId = selectedChannelStoreBinding.getChannelId;
copyDataProperties(object, Reflect.apply(collectChannelAnalyticsMetadata, AppAnalyticsUtilsModule,
[Reflect.apply(getChannel, channelStoreBinding, [Reflect.apply(getChannelId, selectedChannelStoreBinding,
[currentGuildId])])]), currentGuildId);
const current = Reflect.apply(useRef, ReactModule, [object]).current;
(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 object;
let value = environment.__proto__;
const value2 = undefined;
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;
object = {};
analyticsType = popoutData == null ? value2 : popoutData.analyticsType;
value = analyticsType != null;
object.type = value ? analyticsType : 'Standard Emoji Popout';
object.nonce = nonce;
copyDataProperties(object, current, value);
Reflect.apply(track, defaultImport, [OPEN_POPOUT, object]);
}
return value2;
}
}
}
global.__d(_fun68067, 8626, [31, 1379, 1934, 1881, 661, 4863, 4594, 8530, 683,
2]) /* metro module 8626, dependencies: [31, 1379, 1934, 1881, 661, 4863, 4594, 8530, 683, 2] */;