decord/source/modules/video_calls/native/useIsFiveButtonLayout.tsx

79 lines
2.3 KiB
TypeScript
Raw Normal View History

// Module ID: 9429
// Function ID: 9430
2026-07-20 16:05:17 +00:00
// Name: useIsFiveButtonLayout
// Dependencies: [1386, 1908, 586, 9400, 9430, 9432, 7211, 2]
2026-07-20 16:05:17 +00:00
// Exports: useIsFiveButtonLayout
// Module 9429 (useIsFiveButtonLayout)
2026-09-02 09:53:35 +00:00
import closure_3 from "ensureGuildLoaded" /* 1386 */;
import closure_4 from "createGuildRecordFromRust" /* 1908 */;
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/video_calls/native/useIsFiveButtonLayout.tsx");
2026-07-20 16:05:17 +00:00
export const useIsFiveButtonLayout = function useIsFiveButtonLayout(id) {
2026-07-23 10:11:24 +00:00
const _require = id;
2026-08-24 06:08:38 +00:00
const items = [closure_3];
2026-09-02 09:53:35 +00:00
const stateFromStores = _require(586).useStateFromStores(items, () => closure_1_3.getChannel(closure_0));
const obj = _require(586);
2026-07-29 08:29:29 +00:00
const tmp = _require;
let isConnectedToVoiceChannel = _require(9400).useIsConnectedToVoiceChannel(stateFromStores);
2026-07-20 16:05:17 +00:00
let guild_id;
2026-07-29 08:29:29 +00:00
if (stateFromStores != null) {
2026-07-20 16:05:17 +00:00
guild_id = stateFromStores.guild_id;
}
2026-07-29 08:29:29 +00:00
if (guild_id == null) {
guild_id = null;
2026-07-20 16:05:17 +00:00
}
let guild_id1;
const obj3 = _require(9400);
2026-07-29 08:29:29 +00:00
if (stateFromStores != null) {
2026-07-20 16:05:17 +00:00
guild_id1 = stateFromStores.guild_id;
}
2026-07-29 08:29:29 +00:00
if (guild_id1 == null) {
guild_id1 = null;
2026-07-20 16:05:17 +00:00
}
id = undefined;
2026-07-29 08:29:29 +00:00
if (stateFromStores != null) {
2026-07-20 16:05:17 +00:00
id = stateFromStores.id;
}
const tmp6 = guild_id(9430);
const tmp6Result = guild_id(9430)(guild_id1, id);
2026-08-24 06:08:38 +00:00
const items1 = [closure_4];
2026-07-29 08:29:29 +00:00
const items2 = [guild_id];
2026-09-02 09:53:35 +00:00
const stateFromStores1 = tmp(586).useStateFromStores(items1, () => closure_1_4.getGuild(guild_id), items2);
2026-07-29 08:29:29 +00:00
if (stateFromStores1 != null) {
2026-07-20 16:05:17 +00:00
const afkChannelId = stateFromStores1.afkChannelId;
}
2026-07-29 08:29:29 +00:00
let flag;
if (stateFromStores != null) {
flag = stateFromStores.isGuildVoice();
}
if (flag == null) {
flag = false;
2026-07-20 16:05:17 +00:00
}
let id1;
2026-09-02 09:53:35 +00:00
const tmpResult = tmp(586);
2026-07-29 08:29:29 +00:00
if (stateFromStores != null) {
2026-07-20 16:05:17 +00:00
id1 = stateFromStores.id;
}
const tmp5Result = guild_id(9432);
const tmp5ResultResult = guild_id(9432)(id1);
2026-07-20 16:05:17 +00:00
if (isConnectedToVoiceChannel) {
2026-07-29 08:29:29 +00:00
isConnectedToVoiceChannel = tmp6Result;
2026-07-20 16:05:17 +00:00
}
if (isConnectedToVoiceChannel) {
2026-07-29 08:29:29 +00:00
if (!flag) {
flag = tmp5ResultResult;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
isConnectedToVoiceChannel = flag;
2026-07-20 16:05:17 +00:00
}
if (isConnectedToVoiceChannel) {
2026-07-29 08:29:29 +00:00
isConnectedToVoiceChannel = !tmp14;
2026-07-20 16:05:17 +00:00
}
if (isConnectedToVoiceChannel) {
isConnectedToVoiceChannel = afkChannelId !== id;
}
return isConnectedToVoiceChannel;
};