120 lines
9.2 KiB
TypeScript
120 lines
9.2 KiB
TypeScript
/* Metro module 14567; source: modules/guild_scheduled_events/useGuildHasLiveChannelNotice.tsx; dependencies: [31, 4810, 1384, 4492, 1379, 3784, 4300, 14568, 1385, 482, 14569, 566, 9127, 14570, 6273, 6268, 2] */
|
|
import ChannelStore from '../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
|
|
import StageInstanceStore from '../stage_channels/StageInstanceStore.tsx'; /* Metro dependency 1384 */
|
|
import PermissionStore from '../../stores/PermissionStore.tsx'; /* Metro dependency 3784 */
|
|
import SortedVoiceStateStore from '../../stores/views/SortedVoiceStateStore.tsx'; /* Metro dependency 4300 */
|
|
import ApplicationStreamingStore from '../../stores/ApplicationStreamingStore.tsx'; /* Metro dependency 4492 */
|
|
import StageChannelParticipantStore from '../stage_channels/StageChannelParticipantStore.tsx'; /* Metro dependency 4810 */
|
|
import LiveChannelNoticesStore from './LiveChannelNoticesStore.tsx'; /* Metro dependency 14568 */
|
|
import UseLiveStageChannels from '../stage_channels/useLiveStageChannels.tsx'; /* Metro dependency 14569 */
|
|
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactModule from '../../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as ConstantsModule from '../../external/discord_common/js/shared/Constants.tsx'; /* Metro dependency 482 */
|
|
import * as GuildScheduledEventsConstantsModule from './GuildScheduledEventsConstants.tsx'; /* Metro dependency 1385 */
|
|
import * as StageChannelParticipantStoreHooksModule from '../stage_channels/StageChannelParticipantStoreHooks.tsx'; /* Metro dependency 6273 */
|
|
import * as UseGuildScheduledEventsModule from './useGuildScheduledEvents.tsx'; /* Metro dependency 9127 */
|
|
import * as UseActiveEventOrStageInstanceChannelModule from './useActiveEventOrStageInstanceChannel.tsx'; /* Metro dependency 14570 */
|
|
|
|
function _fun110170(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#110170, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:6, offset: 0x0236d6a0, size: 290 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/guild_scheduled_events/useGuildHasLiveChannelNotice.tsx');
|
|
exports.useGuildHasLiveChannelNotice = useGuildHasLiveChannelNotice;
|
|
exports.useGuildLiveChannelNoticeInfo = useGuildLiveChannelNoticeInfo;
|
|
function useGuildHasLiveChannelNotice(a0) { // fn#110171, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:368, offset: 0x0236d7c2, size: 263 bytes, params: 2, frame: 23
|
|
const value2 = undefined;
|
|
const value3 = (UseLiveStageChannels)(a0);
|
|
const channelStoreBinding = ChannelStore;
|
|
const getChannel = channelStoreBinding.getChannel;
|
|
const property = value3[0];
|
|
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([StageInstanceStore], _fun110172,
|
|
[Reflect.apply(getChannel, channelStoreBinding, [property == null ? value2 : property.id])]);
|
|
const value6 = (UseGuildScheduledEventsModule).useGuildActiveEvent(a0);
|
|
const value = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([LiveChannelNoticesStore],
|
|
_fun110173, [value5, value6]);
|
|
const isStageNoticeHidden = value.isStageNoticeHidden;
|
|
return value6 != null ? value5 != null ? !isStageNoticeHidden : !value.isEventNoticeHidden : value5 != null && !isStageNoticeHidden;
|
|
function _fun110172() { // fn#110172, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:507, offset: 0x0236d8c9, size: 47 bytes, params: 1, frame: 13
|
|
return StageInstanceStore.getStageInstanceByChannel(env0_0?.id);
|
|
}
|
|
|
|
function _fun110173() { // fn#110173, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:641, offset: 0x0236d8f8, size: 110 bytes, params: 1, frame: 18
|
|
const object = {};
|
|
const liveChannelNoticesStoreBinding = LiveChannelNoticesStore;
|
|
const value3 = undefined;
|
|
object.isStageNoticeHidden = liveChannelNoticesStoreBinding.isLiveChannelNoticeHidden({stageId: env0_1 == null ? value3 : env0_1.id});
|
|
object.isEventNoticeHidden = LiveChannelNoticesStore.isLiveChannelNoticeHidden({eventId: env0_2 == null ? value3 : env0_2.id});
|
|
return object;
|
|
}
|
|
|
|
}
|
|
|
|
function useGuildLiveChannelNoticeInfo(a0) { // fn#110174, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:937, offset: 0x0236d966, size: 470 bytes, params: 2, frame: 25
|
|
const value2 = undefined;
|
|
const value3 = (UseActiveEventOrStageInstanceChannelModule).useActiveEventOrStageInstanceChannel(a0);
|
|
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun110175);
|
|
const value5 = (UseGuildScheduledEventsModule).useGuildActiveEvent(a0);
|
|
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([StageInstanceStore], _fun110176,
|
|
[value3]);
|
|
const useActualStageSpeakerCount = StageChannelParticipantStoreHooksModule.useActualStageSpeakerCount;
|
|
const value8 = Reflect.apply(useActualStageSpeakerCount, StageChannelParticipantStoreHooksModule,
|
|
[value3 == null ? value2 : value3.id]) > 0;
|
|
const value9 = (require(566) /* metro dependency 566: flux */).useStateFromStores([SortedVoiceStateStore],
|
|
_fun110177);
|
|
const value10 = false;
|
|
const r6 = value3 == null ? value3 != null && value5 != null ? value9 : value10 : value6 != null ? value8 : value3 != null && value5 != null ? value9 : value10;
|
|
const value13 = (require(566) /* metro dependency 566: flux */).useStateFromStores([StageChannelParticipantStore],
|
|
_fun110178, [value3]);
|
|
return value13.useMemo(_fun110180, [value4, value5 == null ? value2 : value5.entity_type, r6, value13,
|
|
(require(566) /* metro dependency 566: flux */).useStateFromStores([ApplicationStreamingStore], _fun110179)]);
|
|
function _fun110175() { // fn#110175, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:1069, offset: 0x0236db3c, size: 51 bytes, params: 1, frame: 14
|
|
return env0_0 != null && PermissionStore.can(Permissions.CONNECT, env0_0);
|
|
}
|
|
|
|
function _fun110176() { // fn#110176, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:1172, offset: 0x0236d8c9, size: 47 bytes, params: 1, frame: 13
|
|
return StageInstanceStore.getStageInstanceByChannel(env0_0?.id);
|
|
}
|
|
|
|
function _fun110177() { // fn#110177, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:1327, offset: 0x0236db6f, size: 51 bytes, params: 1, frame: 12
|
|
return env0_0 != null && SortedVoiceStateStore.getVoiceStatesForChannel(env0_0).length > 0;
|
|
}
|
|
|
|
function _fun110178() { // fn#110178, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:1470, offset: 0x0236dba2, size: 86 bytes, params: 1, frame: 16
|
|
var r0;
|
|
var value3;
|
|
var stageChannelParticipantStoreBinding;
|
|
var value;
|
|
const value2 = env0_0 != null;
|
|
if (value2) {
|
|
value3 = environment.__proto__;
|
|
stageChannelParticipantStoreBinding = StageChannelParticipantStore;
|
|
value = stageChannelParticipantStoreBinding.getParticipantCount(env0_0.id,
|
|
(require(6268) /* metro dependency 6268: StageChannelParticipants */).StageChannelParticipantNamedIndex.AUDIENCE);
|
|
value = value > 0;
|
|
r0 = value;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
function _fun110179() { // fn#110179, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:1606, offset: 0x0236dbf8, size: 56 bytes, params: 1, frame: 12
|
|
return env0_0 != null && ApplicationStreamingStore.getAllApplicationStreamsForChannel(env0_0.id).length > 0;
|
|
}
|
|
|
|
function _fun110180() { // fn#110180, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14764:1722, offset: 0x0236dc30, size: 67 bytes, params: 1, frame: 4
|
|
const entity_typeBinding = entity_type;
|
|
const EXTERNAL = GuildScheduledEventEntityTypes.EXTERNAL;
|
|
return {hasButton: entity_typeBinding === EXTERNAL || env0_1, hasSpeakers: env0_2, hasAudience: ReactModule,
|
|
hasStream: env0_4};
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun110170, 14567, [31, 4810, 1384, 4492, 1379, 3784, 4300, 14568, 1385, 482, 14569, 566, 9127, 14570,
|
|
6273, 6268,
|
|
2]) /* metro module 14567, dependencies: [31, 4810, 1384, 4492, 1379, 3784, 4300, 14568, 1385, 482, 14569, 566, 9127, 14570, 6273, 6268, 2] */;
|