decord/source/modules/video_calls/native/useIsFiveButtonLayout.tsx
github-actions da5b5e5efe chore: update source for alpha 346.6
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4821.js (118.4 MB)
2026-09-12 13:45:10 +00:00

81 lines
2.4 KiB
TypeScript

// Module ID: 9630
// Function ID: 9631
// Name: useIsFiveButtonLayout
// Dependencies: [1957, 1979, 504, 9601, 9631, 9633, 7374, 2]
// Exports: useIsFiveButtonLayout
// Module 9630 (useIsFiveButtonLayout)
import ChannelStore from "ChannelStore" /* 1957 */;
import GuildStore from "GuildStore" /* 1979 */;
const require = globalThis.__r;
const require = fn;
const size = fn(2);
const result = size.fileFinishedImporting("modules/video_calls/native/useIsFiveButtonLayout.tsx");
export const useIsFiveButtonLayout = function useIsFiveButtonLayout(id) {
_require = id;
const items = [ChannelStore];
const stateFromStores = require("initialize").useStateFromStores(items, () => ChannelStore.getChannel(closure_0));
const obj = require("initialize");
const tmp = _require;
let isConnectedToVoiceChannel = require("VoiceChatHooks").useIsConnectedToVoiceChannel(stateFromStores);
let guild_id;
if (stateFromStores != null) {
guild_id = stateFromStores.guild_id;
}
if (guild_id == null) {
guild_id = null;
}
let guild_id1;
const obj3 = require("VoiceChatHooks");
if (stateFromStores != null) {
guild_id1 = stateFromStores.guild_id;
}
if (guild_id1 == null) {
guild_id1 = null;
}
id = undefined;
if (stateFromStores != null) {
id = stateFromStores.id;
}
const tmp6 = guild_id(9631);
const tmp6Result = guild_id(9631)(guild_id1, id);
const items1 = [GuildStore];
const items2 = [guild_id];
const stateFromStores1 = tmp(504).useStateFromStores(items1, () => GuildStore.getGuild(guild_id), items2);
if (stateFromStores1 != null) {
const afkChannelId = stateFromStores1.afkChannelId;
}
let flag;
if (stateFromStores != null) {
flag = stateFromStores.isGuildVoice();
}
if (flag == null) {
flag = false;
}
let id1;
const tmpResult = tmp(504);
if (stateFromStores != null) {
id1 = stateFromStores.id;
}
const tmp5Result = guild_id(9633);
const tmp5ResultResult = guild_id(9633)(id1);
if (isConnectedToVoiceChannel) {
isConnectedToVoiceChannel = tmp6Result;
}
if (isConnectedToVoiceChannel) {
if (!flag) {
flag = tmp5ResultResult;
}
isConnectedToVoiceChannel = flag;
}
if (isConnectedToVoiceChannel) {
isConnectedToVoiceChannel = !tmp14;
}
if (isConnectedToVoiceChannel) {
isConnectedToVoiceChannel = afkChannelId !== id;
}
return isConnectedToVoiceChannel;
};