decord/source/modules/polls/useTrackPollEvents.tsx
github-actions 7450227d0b chore: update source for alpha 345.4
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9596_m.js (380.6 MB)
2026-09-04 17:41:35 +00:00

40 lines
1.4 KiB
TypeScript

// Module ID: 12139
// Function ID: 12140
// Name: useTrackPollCreationEvents
// Dependencies: [19, 673, 4708, 11652, 2]
// Exports: useTrackPollCreationEvents
// Module 12139 (useTrackPollCreationEvents)
import closure_3 from "noop" /* 19 */;
import { AnalyticEvents } from "ME" /* 673 */;
const require = arg1;
const result = require("set").fileFinishedImporting("modules/polls/useTrackPollEvents.tsx");
export const useTrackPollCreationEvents = function useTrackPollCreationEvents(answers, allowMultiSelect) {
closure_0 = answers;
closure_1 = allowMultiSelect;
const items = [answers, allowMultiSelect];
return {
trackPollCreationCancelled: React.useCallback(() => {
answers = 0;
c1 = 0;
c2 = 0;
const item = answers.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;
}
}
});
let obj = allowMultiSelect(closure_1_2[2]);
obj = { answers_count: answers.length, attachments_count: answers, emojis_count: c1, stickers_count: c2, allow_multiselect: c1, layout_type: answers(closure_1_2[3]).PollLayoutTypes.DEFAULT };
obj.trackWithMetadata(closure_1_4.POLL_CREATION_CANCELLED, obj);
}, items)
};
};