decord/source/modules/reactions/native/useEmojisForReactionRow.tsx

38 lines
1.4 KiB
TypeScript
Raw Normal View History

// Module ID: 11736
// Function ID: 11737
2026-07-20 16:05:17 +00:00
// Name: useEmojisForReactionRow
// Dependencies: [19, 1374, 10290, 1477, 4217, 2]
2026-07-20 16:05:17 +00:00
// Exports: useEmojisForReactionRow
// Module 11736 (useEmojisForReactionRow)
2026-08-24 06:08:38 +00:00
import closure_3 from "noop" /* 19 */;
import { EmojiIntention } from "set" /* 1374 */;
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/reactions/native/useEmojisForReactionRow.tsx");
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
export const useEmojisForReactionRow = function useEmojisForReactionRow(channel, closure_4, arg2) {
const _require = channel;
2026-07-20 16:05:17 +00:00
const guildId = channel.getGuildId();
2026-07-23 10:11:24 +00:00
const frequentlyUsedReactionEmojis = _require(rounded[2]).useFrequentlyUsedReactionEmojis(guildId);
rounded = Math.floor(Math.min(frequentlyUsedReactionEmojis(rounded[3])().width, closure_4) / arg2);
2026-07-20 16:05:17 +00:00
const items = [frequentlyUsedReactionEmojis, channel, rounded];
const memo = React.useMemo(() => {
let length;
const found = frequentlyUsedReactionEmojis.filter((emoji) => {
2026-08-24 06:08:38 +00:00
let obj = closure_1_1(closure_1_2[4]);
obj = { emoji, channel: closure_0, intention: closure_1_4.REACTION };
2026-07-20 16:05:17 +00:00
return !obj.isEmojiFilteredOrLocked(obj);
});
if (found.length < rounded) {
do {
let arr = found.push(null);
2026-07-23 10:11:24 +00:00
let tmp2 = rounded;
2026-07-20 16:05:17 +00:00
length = found.length;
2026-07-23 10:11:24 +00:00
} while (length < rounded);
2026-07-20 16:05:17 +00:00
}
return found;
}, items);
return memo.slice(0, rounded - 1);
};