Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4790.js (118.4 MB)
41 lines
1.6 KiB
TypeScript
41 lines
1.6 KiB
TypeScript
// Module ID: 12277
|
|
// Function ID: 12278
|
|
// Name: useTrackPollEvents
|
|
// Dependencies: [19, 1074, 4785, 11791, 2]
|
|
// Exports: useTrackPollCreationEvents
|
|
|
|
// Module 12277 (useTrackPollEvents)
|
|
import AppAnalyticsUtilsDefault from "AppAnalyticsUtils" /* 4785 */;
|
|
import PollLayoutTypes from "PollLayoutTypes" /* 11791 */;
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
require = fn;
|
|
const AnalyticEvents = fn(1074).AnalyticEvents;
|
|
const size = fn(2);
|
|
const result = size.fileFinishedImporting("modules/polls/useTrackPollEvents.tsx");
|
|
|
|
export const useTrackPollCreationEvents = function useTrackPollCreationEvents(answers, allowMultiSelect) {
|
|
let attachments_count = answers;
|
|
let obj = { trackPollCreationCancelled: null };
|
|
const items = [answers, allowMultiSelect];
|
|
obj.trackPollCreationCancelled = noop.useCallback(() => {
|
|
attachments_count = 0;
|
|
allowMultiSelect = 0;
|
|
stickers_count = 0;
|
|
const item = attachments_count.forEach((image) => {
|
|
image = image.image;
|
|
if (null != image) {
|
|
if (null != image.emoji) {
|
|
closure_1 = closure_1 + 1;
|
|
} else if (null != image.stickerId) {
|
|
closure_2 = closure_2 + 1;
|
|
} else if (null != image.mediaAttachmentState) {
|
|
closure_0 = closure_0 + 1;
|
|
}
|
|
}
|
|
});
|
|
const obj = AppAnalyticsUtilsDefault;
|
|
obj.trackWithMetadata(AnalyticEvents.POLL_CREATION_CANCELLED, { answers_count: attachments_count.length, attachments_count, emojis_count: allowMultiSelect, stickers_count, allow_multiselect: allowMultiSelect, layout_type: PollLayoutTypes.PollLayoutTypes.DEFAULT });
|
|
}, items);
|
|
return obj;
|
|
};
|