decord/source/modules/connectivity/native/components/GlobalStatusContent.tsx
github-actions 20a21ad13f chore: update source for alpha 346.5
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4791.js (118.4 MB)
2026-09-11 19:12:58 +00:00

134 lines
4.9 KiB
TypeScript

// Module ID: 9776
// Function ID: 9777
// Name: GlobalStatusContent
// Dependencies: [19, 17, 1957, 1979, 4629, 4624, 9771, 1074, 21, 4606, 576, 9305, 504, 9674, 9769, 4458, 4541, 5177, 4464, 9557, 1115, 1611, 9572, 9777, 2]
// Exports: default
// Module 9776 (GlobalStatusContent)
import nativeDefault from "native" /* 576 */;
import useThemeDefault from "useTheme" /* 4541 */;
import useVoiceStateForRemoteSessionDefault from "useVoiceStateForRemoteSession" /* 9305 */;
import useCanSpeakInChannelDefault from "useCanSpeakInChannel" /* 9674 */;
import useIsInvitedToSpeakDefault from "useIsInvitedToSpeak" /* 9769 */;
import noop from "module_19" /* 19 */;
import ChannelStore from "ChannelStore" /* 1957 */;
import GuildStore from "GuildStore" /* 1979 */;
import RTCConnectionStore from "RTCConnectionStore" /* 4629 */;
import SessionsStore from "SessionsStore" /* 4624 */;
const require = globalThis.__r;
const require = fn;
const View = fn(17).View;
const RTC_PANEL_HEIGHT = fn(9771).RTC_PANEL_HEIGHT;
const RTCConnectionStates = fn(1074).RTCConnectionStates;
const jsxProd = fn(21);
({ jsx: c10, jsxs: closure_11 } = jsxProd);
const createStyles = fn(4606);
let obj2 = { bgNeutral: { backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOWEST }, bg: null, container: null };
const obj3 = { backgroundColor: nativeDefault.colors.BACKGROUND_BASE_LOWEST };
obj2.bg = { backgroundColor: nativeDefault.unsafe_rawColors.GREEN_360 };
obj2.container = { paddingHorizontal: 16, alignItems: "center", justifyContent: "center" };
let closure_12 = createStyles.createStyles(obj2);
const size = fn(2);
const result = size.fileFinishedImporting("modules/connectivity/native/components/GlobalStatusContent.tsx");
export default function ConnectivityGlobalStatusContent() {
const tmp = closure_12();
const tmp4 = useVoiceStateForRemoteSessionDefault();
_require = tmp4;
const items = [RTCConnectionStore, GuildStore, ChannelStore, SessionsStore];
const items1 = [tmp4];
const stateFromStoresObject = require("initialize").useStateFromStoresObject(items, () => {
let channelId;
if (closure_0 != null) {
channelId = tmp2.channelId;
}
if (channelId == null) {
channelId = RTCConnectionStore.getChannelId();
}
const channel = ChannelStore.getChannel(channelId);
if (null != closure_0) {
let guildId;
if (channel != null) {
guildId = channel.getGuildId();
}
let guildId1 = guildId;
} else {
guildId1 = RTCConnectionStore.getGuildId();
}
let str;
const guild = GuildStore.getGuild(guildId1);
if (closure_0 != null) {
str = tmp2.sessionId;
}
if (str == null) {
str = "";
}
const sessionById = SessionsStore.getSessionById(str);
let os;
if (sessionById != null) {
os = sessionById.clientInfo.os;
}
const obj = { guild, channel, rtcConnectionState: null, remotePlatform: null };
if (null != closure_0) {
let RTC_CONNECTED = RTCConnectionStates.RTC_CONNECTED;
} else {
RTC_CONNECTED = RTCConnectionStore.getState();
}
obj.rtcConnectionState = RTC_CONNECTED;
obj.remotePlatform = os;
return obj;
}, items1);
let channel = stateFromStoresObject.channel;
let isGuildStageVoiceResult;
({ guild, rtcConnectionState, remotePlatform } = stateFromStoresObject);
if (channel != null) {
isGuildStageVoiceResult = channel.isGuildStageVoice();
}
let id;
let obj = require("initialize");
if (channel != null) {
id = channel.id;
}
let tmp2ResultResult = useCanSpeakInChannelDefault(id);
const tmp2Result = useCanSpeakInChannelDefault;
const tmp11 = useIsInvitedToSpeakDefault();
let tmp14 = tmp12;
const tmp5Result = require("shared");
if (isGuildStageVoiceResult) {
if (!tmp2ResultResult) {
tmp2ResultResult = tmp11;
}
tmp14 = tmp2ResultResult;
}
const isThemeDarkResult = require("shared").isThemeDark(useThemeDefault());
let isScreenLandscape = require("useIsScreenLandscape").useIsScreenLandscape();
if (isScreenLandscape) {
isScreenLandscape = tmp5(4464).isModalOpen(tmp2(9557));
const tmp5Result5 = tmp5(4464);
}
if (isScreenLandscape) {
isScreenLandscape = tmp5(1115).isAndroid();
const tmp5Result6 = tmp5(1115);
}
let num = 0;
if (!isScreenLandscape) {
num = tmp2(1611)().top;
}
const obj2 = { style: null, children: null };
const items2 = [tmp14 ? tmp.bg : tmp.bgNeutral, tmp.container, { minHeight: RTC_PANEL_HEIGHT + num, paddingTop: num }];
obj2.style = items2;
if (isScreenLandscape) {
isScreenLandscape = closure_10(tmp2(9572), { hidden: true });
}
const items3 = [isScreenLandscape, ];
let tmp19 = null;
if (isGuildStageVoiceResult) {
const obj4 = { channel, guild, hasRTCConnectivity: tmp12, isDarkTheme: isThemeDarkResult, rtcConnectionState, remotePlatform };
tmp19 = closure_10(tmp2(9777), obj4);
}
items3[1] = tmp19;
obj2.children = items3;
return closure_11(View, obj2);
};