decord/source/modules/chat/useTypingText.tsx

57 lines
1.8 KiB
TypeScript
Raw Normal View History

// Module ID: 12009
// Function ID: 12010
2026-07-29 08:29:29 +00:00
// Name: useTypingText
// Dependencies: [32, 1371, 504, 4726, 1114, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
// Module 12009 (useTypingText)
import NicknameUtilsDefault from "NicknameUtils" /* 4726 */;
import _slicedToArray from "module_32" /* 32 */;
import UserStore from "UserStore" /* 1371 */;
2026-07-23 10:11:24 +00:00
const require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/chat/useTypingText.tsx");
2026-07-20 16:05:17 +00:00
export default function useTypingText(channelId) {
channelId = channelId.channelId;
const guildId = channelId.guildId;
const typingUserIds = channelId.typingUserIds;
2026-07-29 08:29:29 +00:00
let lJ9sZX = channelId;
let obj = typingUserIds;
let items = [UserStore];
2026-07-20 16:05:17 +00:00
const items1 = [channelId, guildId, typingUserIds];
2026-07-29 08:29:29 +00:00
const obj2 = channelId(typingUserIds[2]);
[tmp2, tmp3, tmp4] = channelId(typingUserIds[2]).useStateFromStoresArray(items, () => {
2026-07-20 16:05:17 +00:00
const items = [];
2026-07-29 08:29:29 +00:00
while (tmp2 !== undefined) {
let user = UserStore.getUser(tmp3);
2026-07-29 08:29:29 +00:00
if (null != user) {
let obj = NicknameUtilsDefault;
2026-07-29 08:29:29 +00:00
let arr = items.push(obj.getName(guildId, channelId, tmp6));
}
continue;
2026-07-20 16:05:17 +00:00
}
return items;
}, items1);
2026-07-29 08:29:29 +00:00
if (null == tmp2) {
2026-07-20 16:05:17 +00:00
return null;
} else if (null == tmp3) {
2026-07-29 08:29:29 +00:00
const intl4 = lJ9sZX(obj[4]).intl;
lJ9sZX = lJ9sZX(obj[4]).t.lJ9sZX;
obj = { a: tmp2 };
2026-07-29 08:29:29 +00:00
let formatResult = intl4.format(lJ9sZX, obj);
2026-07-20 16:05:17 +00:00
} else if (null == tmp4) {
2026-07-29 08:29:29 +00:00
const intl3 = lJ9sZX(obj[4]).intl;
const obj3 = { a: tmp2, b: tmp3 };
formatResult = intl3.format(lJ9sZX(obj[4]).t.rB0CUa, obj3);
2026-07-20 16:05:17 +00:00
} else if (null == tmp5) {
2026-07-29 08:29:29 +00:00
const intl2 = lJ9sZX(obj[4]).intl;
const obj4 = { a: tmp2, b: tmp3, c: tmp4 };
formatResult = intl2.format(lJ9sZX(obj[4]).t.StKThj, obj4);
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
const intl = lJ9sZX(obj[4]).intl;
formatResult = intl.string(lJ9sZX(obj[4]).t.uVDhqZ);
2026-07-20 16:05:17 +00:00
}
};