decord/source/modules/user_profile/native/UserProfileVoiceActivityIcon.tsx
github-actions e510164e6b chore: update source for alpha 346.2
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
2026-09-10 05:38:07 +00:00

66 lines
2.2 KiB
TypeScript

// Module ID: 10926
// Function ID: 10927
// Name: UserProfileVoiceActivityIcon
// Dependencies: [19, 4212, 1085, 21, 504, 7894, 5076, 5110, 5111, 5113, 5112, 5115, 2]
// Exports: default
// Module 10926 (UserProfileVoiceActivityIcon)
import isRoleRequiredDefault from "isRoleRequired" /* 5076 */;
import noop from "module_19" /* 19 */;
import PermissionStore from "PermissionStore" /* 4212 */;
const require = fn;
const Permissions = fn(1085).Permissions;
const jsx = fn(21).jsx;
const size = fn(2);
const result = size.fileFinishedImporting("modules/user_profile/native/UserProfileVoiceActivityIcon.tsx");
export default function UserProfileVoiceActivityIcon(channel) {
channel = channel.channel;
const merged = Object.assign(channel, Object.assign({ channel: 0 }));
const items = [PermissionStore];
const stateFromStores = channel(504).useStateFromStores(items, () => {
let isPrivateResult = channel.isPrivate();
if (!isPrivateResult) {
isPrivateResult = PermissionStore.can(Permissions.CONNECT, channel);
}
return isPrivateResult;
});
if (!channel.isDM()) {
if (!channel.isGroupDM()) {
const isGuildStageVoiceResult = channel.isGuildStageVoice();
let tmp6 = !stateFromStores;
if (stateFromStores) {
tmp6 = isRoleRequiredDefault(channel);
}
if (isGuildStageVoiceResult) {
if (tmp6) {
const obj2 = {};
const merged1 = Object.assign(merged);
let tmp8Result = jsx(tmp2(5110).StageLockIcon, {});
}
return tmp8Result;
}
if (isGuildStageVoiceResult) {
const obj3 = {};
const merged2 = Object.assign(merged);
tmp8Result = jsx(tmp2(5111).StageIcon, {});
} else if (channel.isNSFW()) {
const obj4 = {};
const merged3 = Object.assign(merged);
tmp8Result = tmp8(tmp2(5113).VoiceWarningIcon, obj4);
} else {
if (tmp6) {
let VoiceNormalIcon = tmp2(5112).VoiceLockIcon;
} else {
VoiceNormalIcon = tmp2(5115).VoiceNormalIcon;
}
const obj5 = {};
const merged4 = Object.assign(merged);
tmp8Result = tmp8(VoiceNormalIcon, obj5);
}
}
}
const merged5 = Object.assign(merged);
return jsx(channel(7894).PhoneCallIcon, {});
};