/* Metro module 10739; source: modules/connectivity/native/components/GlobalStatusContent.tsx; dependencies: [31, 27, 1379, 1867, 4294, 4296, 10735, 661, 33, 4501, 697, 9325, 566, 10659, 10733, 4002, 4048, 8750, 4007, 7714, 477, 1585, 7725, 10740, 2] */
function _fun82495(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82495, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10925:6, offset: 0x01ef88c7, size: 389 bytes, params: 8, frame: 23
var object2;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
importAll(31) /* metro dependency 31 */;
const env0_3 = (require(27) /* metro dependency 27 */).View;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const guildStore = importDefault(1867) /* metro dependency 1867: GuildStore */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const sessionsStore = importDefault(4296) /* metro dependency 4296: SessionsStore */;
const RTC_PANEL_HEIGHT = (require(10735) /* metro dependency 10735: ConnectivityConstants */).RTC_PANEL_HEIGHT;
const env0_8 = (require(661) /* metro dependency 661: Constants */).RTCConnectionStates;
let value = require(33) /* metro dependency 33 */;
const env0_9 = value.jsx;
const env0_10 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object2 = {};
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
object2.bgNeutral = {backgroundColor: BACKGROUND_BASE_LOWEST};
const GREEN_360 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_360;
object2.bg = {backgroundColor: GREEN_360};
object2.container = {'paddingHorizontal': 16, 'minHeight': null, 'alignItems': 'center', 'justifyContent': 'center',
minHeight: RTC_PANEL_HEIGHT};
const env0_11 = Reflect.apply(createStyles, value, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/connectivity/native/components/GlobalStatusContent.tsx');
exports.default = _default_82496;
}
function _default_82496() { // fn#82496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10925:491, offset: 0x01ef8a4c, size: 633 bytes, params: 1, frame: 29
var r8;
var r5;
var moduleValue4;
var value;
const value2 = undefined;
const styles = useStyles();
const {guild, channel, rtcConnectionState,
remotePlatform} = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([RTCConnectionStore,
GuildStore, ChannelStore, SessionsStore], _fun82497,
[(importDefault(9325) /* metro dependency 9325: useVoiceStateForRemoteSession */)()]);
const value5 = null;
const r7 = value5 == channel ? value2 : channel.isGuildStageVoice();
const value6 = (importDefault(10659) /* metro dependency 10659: useCanSpeakInChannel */)(value5 == channel ? value2 : channel.id);
const value7 = (importDefault(10733) /* metro dependency 10733: useIsInvitedToSpeak */)();
const value8 = value5 != channel;
const isThemeDark2 = (require(4002) /* metro dependency 4002: shared */).isThemeDark((importDefault(4048) /* metro dependency 4048: useTheme */)());
const r4 = r7 ? value6 || value7 : value8;
const value9 = (require(8750) /* metro dependency 8750: useIsScreenLandscapeNative */).useIsScreenLandscape();
if (value9) {
moduleValue4 = require(4007) /* metro dependency 4007: NavigationRouteUtilsNative */;
r8 = moduleValue4.isModalOpen(importDefault(7714) /* metro dependency 7714: ChannelCallModal */);
} else {
r8 = value9;
}
r8 = r8 && (require(477) /* metro dependency 477: PlatformUtils */).isAndroid();
const top = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().top;
const items2 = [r4 ? styles.bg : styles.bgNeutral];
items2[1] = styles.container;
items2[2] = {paddingTop: r8 ? 0 : top};
r8 = r8 && ((Component) => )(importDefault(7725) /* metro dependency 7725: StatusBarAndroid */);
if (r7) {
value = importDefault(10740) /* metro dependency 10740: GlobalStageChannelStatus */;
value = ((Component) => )(value);
r5 = value;
} else {
r5 = value5;
}
return (
{r8}
{r5}
);
}
function _fun82497() { // fn#82497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10925:566, offset: 0x01ef8cc5, size: 252 bytes, params: 1, frame: 19
const value = environment.__proto__;
const value3 = undefined;
const channel = ChannelStore.getChannel((env0_0 == null ? value3 : env0_0.channelId) ?? RTCConnectionStore.getChannelId());
const guild = GuildStore.getGuild(env0_0 != null ? channel == null ? value3 : channel.getGuildId() : RTCConnectionStore.getGuildId());
const sessionById = SessionsStore.getSessionById((env0_0 == null ? value3 : env0_0.sessionId) ?? '');
const os = sessionById == null ? value3 : sessionById.clientInfo.os;
const object2 = {guild: guild, channel: channel};
object2.rtcConnectionState = env0_0 != null ? RTCConnectionStates.RTC_CONNECTED : RTCConnectionStore.getState();
object2.remotePlatform = os;
return object2;
}