2026-09-02 09:53:35 +00:00
|
|
|
// Module ID: 9561
|
|
|
|
|
// Function ID: 9562
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: useIsFiveButtonLayout
|
2026-09-02 09:53:35 +00:00
|
|
|
// Dependencies: [1386, 1908, 586, 9537, 9562, 9563, 6126, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: useIsFiveButtonLayout
|
|
|
|
|
|
2026-09-02 09:53:35 +00:00
|
|
|
// Module 9561 (useIsFiveButtonLayout)
|
|
|
|
|
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;
|
2026-09-02 09:53:35 +00:00
|
|
|
let isConnectedToVoiceChannel = _require(9537).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;
|
2026-09-02 09:53:35 +00:00
|
|
|
const obj3 = _require(9537);
|
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;
|
|
|
|
|
}
|
2026-09-02 09:53:35 +00:00
|
|
|
const tmp6 = guild_id(9562);
|
|
|
|
|
const tmp6Result = guild_id(9562)(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;
|
|
|
|
|
}
|
2026-09-02 09:53:35 +00:00
|
|
|
const tmp5Result = guild_id(9563);
|
|
|
|
|
const tmp5ResultResult = guild_id(9563)(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;
|
|
|
|
|
};
|