decord/source/modules/video_calls/native/useIsFiveButtonLayout.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

81 lines
2.4 KiB
TypeScript

// Module ID: 9532
// Function ID: 9533
// Name: useIsFiveButtonLayout
// Dependencies: [1957, 1979, 504, 9503, 9533, 9535, 7285, 2]
// Exports: useIsFiveButtonLayout
// Module 9532 (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(9533);
const tmp6Result = guild_id(9533)(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(9535);
const tmp5ResultResult = guild_id(9535)(id1);
if (isConnectedToVoiceChannel) {
isConnectedToVoiceChannel = tmp6Result;
}
if (isConnectedToVoiceChannel) {
if (!flag) {
flag = tmp5ResultResult;
}
isConnectedToVoiceChannel = flag;
}
if (isConnectedToVoiceChannel) {
isConnectedToVoiceChannel = !tmp14;
}
if (isConnectedToVoiceChannel) {
isConnectedToVoiceChannel = afkChannelId !== id;
}
return isConnectedToVoiceChannel;
};