2026-10-12 16:32:48 +00:00
|
|
|
// Module ID: 11917
|
|
|
|
|
// Function ID: 11918
|
2026-09-18 19:45:33 +00:00
|
|
|
// Name: useTrackPollEvents
|
2026-10-12 16:32:48 +00:00
|
|
|
// Dependencies: [19, 1085, 558, 576, 5107, 11516, 2]
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-10-12 16:32:48 +00:00
|
|
|
// Module 11917 (useTrackPollEvents)
|
2026-10-07 22:43:51 +00:00
|
|
|
import Constants from "Constants" /* 1085 */;
|
2026-10-12 16:32:48 +00:00
|
|
|
import AppAnalyticsUtilsDefault from "AppAnalyticsUtils" /* 5107 */;
|
|
|
|
|
import PollLayoutTypes from "PollLayoutTypes" /* 11516 */;
|
2026-10-01 14:13:23 +00:00
|
|
|
import react from "react" /* 19 */;
|
2026-10-02 13:37:24 +00:00
|
|
|
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
|
2026-10-01 14:13:23 +00:00
|
|
|
import size from "module_2" /* 2 */;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-10-02 13:37:24 +00:00
|
|
|
const require = globalThis.__r;
|
2026-10-12 16:32:48 +00:00
|
|
|
let _require, closure_0, closure_2, image, stickers_count;
|
2026-10-01 14:13:23 +00:00
|
|
|
|
|
|
|
|
const AnalyticEvents = Constants.AnalyticEvents;
|
2026-10-12 16:32:48 +00:00
|
|
|
let tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useTrackPollCreationEvents(attachments_count, arg1) {
|
2026-10-02 13:37:24 +00:00
|
|
|
_require = attachments_count;
|
|
|
|
|
let closure_1 = arg1;
|
|
|
|
|
let obj = require("react");
|
|
|
|
|
const cResult = obj.c(5);
|
|
|
|
|
if (cResult[0] === arg1) {
|
|
|
|
|
let tmp2;
|
|
|
|
|
let tmp3;
|
|
|
|
|
if (cResult[1] === attachments_count) {
|
|
|
|
|
tmp2 = cResult[2];
|
|
|
|
|
}
|
|
|
|
|
if (cResult[3] !== tmp2) {
|
|
|
|
|
let obj2 = { trackPollCreationCancelled: tmp2 };
|
|
|
|
|
cResult[3] = tmp2;
|
|
|
|
|
cResult[4] = obj2;
|
|
|
|
|
tmp3 = obj2;
|
|
|
|
|
} else {
|
|
|
|
|
tmp3 = cResult[4];
|
|
|
|
|
}
|
|
|
|
|
return tmp3;
|
|
|
|
|
}
|
|
|
|
|
const fn = function o() {
|
|
|
|
|
attachments_count = 0;
|
|
|
|
|
const allow_multiselect = 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;
|
|
|
|
|
const obj2 = { answers_count: attachments_count.length, attachments_count, emojis_count: allow_multiselect, stickers_count, allow_multiselect, layout_type: PollLayoutTypes.PollLayoutTypes.DEFAULT };
|
|
|
|
|
obj.trackWithMetadata(AnalyticEvents.POLL_CREATION_CANCELLED, obj2);
|
|
|
|
|
};
|
|
|
|
|
cResult[0] = arg1;
|
|
|
|
|
cResult[1] = attachments_count;
|
|
|
|
|
cResult[2] = fn;
|
|
|
|
|
tmp2 = fn;
|
2026-10-12 16:32:48 +00:00
|
|
|
}) : (function useTrackPollCreationEvents(attachments_count, arg1) {
|
2026-10-01 14:13:23 +00:00
|
|
|
let items;
|
2026-10-02 13:37:24 +00:00
|
|
|
let closure_1 = arg1;
|
2026-10-01 14:13:23 +00:00
|
|
|
let obj = {
|
|
|
|
|
trackPollCreationCancelled: react.useCallback(() => {
|
|
|
|
|
attachments_count = 0;
|
2026-10-02 13:37:24 +00:00
|
|
|
const allow_multiselect = 0;
|
2026-10-01 14:13:23 +00:00
|
|
|
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;
|
|
|
|
|
}
|
2026-09-18 19:45:33 +00:00
|
|
|
}
|
2026-10-01 14:13:23 +00:00
|
|
|
});
|
|
|
|
|
const obj = AppAnalyticsUtilsDefault;
|
2026-10-02 13:37:24 +00:00
|
|
|
const obj2 = { answers_count: attachments_count.length, attachments_count, emojis_count: allow_multiselect, stickers_count, allow_multiselect, layout_type: PollLayoutTypes.PollLayoutTypes.DEFAULT };
|
2026-10-01 14:13:23 +00:00
|
|
|
obj.trackWithMetadata(AnalyticEvents.POLL_CREATION_CANCELLED, obj2);
|
|
|
|
|
}, items)
|
|
|
|
|
};
|
2026-10-02 13:37:24 +00:00
|
|
|
items = [attachments_count, arg1];
|
2026-09-18 19:45:33 +00:00
|
|
|
return obj;
|
2026-10-02 13:37:24 +00:00
|
|
|
});
|
|
|
|
|
const result = size.fileFinishedImporting("modules/polls/useTrackPollEvents.tsx");
|
|
|
|
|
|
|
|
|
|
export const useTrackPollCreationEvents = tmp2;
|