2026-08-24 06:08:38 +00:00
|
|
|
// Module ID: 15509
|
|
|
|
|
// Function ID: 15510
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: useGuildHasLiveChannelNotice
|
2026-08-24 06:08:38 +00:00
|
|
|
// Dependencies: [19, 4994, 1396, 4658, 1391, 4024, 4550, 15510, 1397, 505, 15511, 589, 8928, 15512, 6745, 6740, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: useGuildHasLiveChannelNotice, useGuildLiveChannelNoticeInfo
|
|
|
|
|
|
2026-08-24 06:08:38 +00:00
|
|
|
// Module 15509 (useGuildHasLiveChannelNotice)
|
|
|
|
|
import closure_3 from "noop" /* 19 */;
|
|
|
|
|
import closure_4 from "getActiveStageChannelIds" /* 4994 */;
|
|
|
|
|
import closure_5 from "handleStageInstanceCreateOrUpdate" /* 1396 */;
|
|
|
|
|
import closure_6 from "reset" /* 4658 */;
|
|
|
|
|
import closure_7 from "ensureGuildLoaded" /* 1391 */;
|
|
|
|
|
import closure_8 from "getUncachedChannelPermissions" /* 4024 */;
|
|
|
|
|
import closure_9 from "getVoiceStatesForGuild" /* 4550 */;
|
|
|
|
|
import closure_10 from "initialize" /* 15510 */;
|
|
|
|
|
import { GuildScheduledEventEntityTypes as closure_11 } from "GUILD_EVENT_MAX_NAME_LENGTH" /* 1397 */;
|
|
|
|
|
import { Permissions } from "sum" /* 505 */;
|
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/guild_scheduled_events/useGuildHasLiveChannelNotice.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export const useGuildHasLiveChannelNotice = function useGuildHasLiveChannelNotice(id) {
|
2026-07-23 10:11:24 +00:00
|
|
|
const first = stateFromStores(guildActiveEvent[10])(id)[0];
|
2026-07-20 16:05:17 +00:00
|
|
|
id = undefined;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (first != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
id = first.id;
|
|
|
|
|
}
|
2026-07-23 10:11:24 +00:00
|
|
|
channel = channel.getChannel(id);
|
2026-08-24 06:08:38 +00:00
|
|
|
const items = [closure_5];
|
2026-07-20 16:05:17 +00:00
|
|
|
const items1 = [channel];
|
2026-07-23 10:11:24 +00:00
|
|
|
stateFromStores = channel(guildActiveEvent[11]).useStateFromStores(items, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
let id;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (channel != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
id = channel.id;
|
|
|
|
|
}
|
2026-08-24 06:08:38 +00:00
|
|
|
return closure_1_5.getStageInstanceByChannel(id);
|
2026-07-20 16:05:17 +00:00
|
|
|
}, items1);
|
2026-07-23 10:11:24 +00:00
|
|
|
let obj = channel(guildActiveEvent[11]);
|
|
|
|
|
guildActiveEvent = channel(guildActiveEvent[12]).useGuildActiveEvent(id);
|
|
|
|
|
const obj2 = channel(guildActiveEvent[12]);
|
2026-08-24 06:08:38 +00:00
|
|
|
const items2 = [closure_10];
|
2026-07-20 16:05:17 +00:00
|
|
|
const items3 = [stateFromStores, guildActiveEvent];
|
2026-07-23 10:11:24 +00:00
|
|
|
const stateFromStoresObject = channel(guildActiveEvent[11]).useStateFromStoresObject(items2, () => {
|
2026-08-24 06:08:38 +00:00
|
|
|
let obj = closure_1_10;
|
2026-07-20 16:05:17 +00:00
|
|
|
let id;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (stateFromStores != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
id = stateFromStores.id;
|
|
|
|
|
}
|
2026-08-24 06:08:38 +00:00
|
|
|
obj = { isStageNoticeHidden: closure_1_10.isLiveChannelNoticeHidden({ stageId: id }), isEventNoticeHidden: null };
|
2026-07-20 16:05:17 +00:00
|
|
|
let id1;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (guildActiveEvent != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
id1 = guildActiveEvent.id;
|
|
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
obj[1] = obj.isLiveChannelNoticeHidden({ eventId: id1 });
|
2026-07-20 16:05:17 +00:00
|
|
|
return obj;
|
|
|
|
|
}, items3);
|
|
|
|
|
const isStageNoticeHidden = stateFromStoresObject.isStageNoticeHidden;
|
|
|
|
|
if (null == guildActiveEvent) {
|
|
|
|
|
return null != stateFromStores && !isStageNoticeHidden;
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
export const useGuildLiveChannelNoticeInfo = function useGuildLiveChannelNoticeInfo(id) {
|
2026-07-23 10:11:24 +00:00
|
|
|
activeEventOrStageInstanceChannel = activeEventOrStageInstanceChannel(stateFromStores2[13]).useActiveEventOrStageInstanceChannel(id);
|
|
|
|
|
const obj = activeEventOrStageInstanceChannel(stateFromStores2[13]);
|
2026-08-24 06:08:38 +00:00
|
|
|
const items = [closure_8];
|
2026-07-23 10:11:24 +00:00
|
|
|
const stateFromStores = activeEventOrStageInstanceChannel(stateFromStores2[11]).useStateFromStores(items, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
let canResult = null != activeEventOrStageInstanceChannel;
|
|
|
|
|
if (canResult) {
|
2026-08-24 06:08:38 +00:00
|
|
|
canResult = closure_1_8.can(closure_1_12.CONNECT, tmp);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
return canResult;
|
|
|
|
|
});
|
2026-07-23 10:11:24 +00:00
|
|
|
const obj2 = activeEventOrStageInstanceChannel(stateFromStores2[11]);
|
|
|
|
|
const guildActiveEvent = activeEventOrStageInstanceChannel(stateFromStores2[12]).useGuildActiveEvent(id);
|
|
|
|
|
const obj3 = activeEventOrStageInstanceChannel(stateFromStores2[12]);
|
|
|
|
|
const items1 = [entity_type];
|
2026-07-20 16:05:17 +00:00
|
|
|
const items2 = [activeEventOrStageInstanceChannel];
|
2026-07-23 10:11:24 +00:00
|
|
|
const stateFromStores1 = activeEventOrStageInstanceChannel(stateFromStores2[11]).useStateFromStores(items1, () => {
|
2026-07-20 16:05:17 +00:00
|
|
|
let id;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (activeEventOrStageInstanceChannel != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
id = activeEventOrStageInstanceChannel.id;
|
|
|
|
|
}
|
|
|
|
|
return entity_type.getStageInstanceByChannel(id);
|
|
|
|
|
}, items2);
|
2026-07-23 10:11:24 +00:00
|
|
|
const obj4 = activeEventOrStageInstanceChannel(stateFromStores2[11]);
|
2026-07-20 16:05:17 +00:00
|
|
|
id = undefined;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (activeEventOrStageInstanceChannel != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
id = activeEventOrStageInstanceChannel.id;
|
|
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
const tmp8 = activeEventOrStageInstanceChannel(stateFromStores2[14]).useActualStageSpeakerCount(id) > 0;
|
|
|
|
|
let tmpResult = tmp(tmp2[11]);
|
2026-08-24 06:08:38 +00:00
|
|
|
const items3 = [closure_9];
|
2026-07-29 08:29:29 +00:00
|
|
|
stateFromStores2 = tmpResult.useStateFromStores(items3, () => {
|
|
|
|
|
let tmp2 = null != activeEventOrStageInstanceChannel;
|
|
|
|
|
if (tmp2) {
|
2026-08-24 06:08:38 +00:00
|
|
|
tmp2 = closure_1_9.getVoiceStatesForChannel(tmp).length > 0;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
return tmp2;
|
2026-07-20 16:05:17 +00:00
|
|
|
});
|
2026-07-23 10:11:24 +00:00
|
|
|
stateFromStores2 = false;
|
2026-07-20 16:05:17 +00:00
|
|
|
if (null != activeEventOrStageInstanceChannel) {
|
|
|
|
|
if (null != stateFromStores1) {
|
2026-07-29 08:29:29 +00:00
|
|
|
stateFromStores2 = tmp8;
|
|
|
|
|
let flag = tmp8;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
tmpResult = tmp(tmp2[11]);
|
2026-07-23 10:11:24 +00:00
|
|
|
const items4 = [stateFromStores4];
|
2026-07-20 16:05:17 +00:00
|
|
|
const items5 = [activeEventOrStageInstanceChannel];
|
2026-07-29 08:29:29 +00:00
|
|
|
const stateFromStores3 = tmpResult.useStateFromStores(items4, () => {
|
|
|
|
|
let tmp2 = null != activeEventOrStageInstanceChannel;
|
|
|
|
|
if (tmp2) {
|
|
|
|
|
tmp2 = stateFromStores4.getParticipantCount(tmp.id, activeEventOrStageInstanceChannel(stateFromStores2[15]).StageChannelParticipantNamedIndex.AUDIENCE) > 0;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
return tmp2;
|
2026-07-20 16:05:17 +00:00
|
|
|
}, items5);
|
2026-08-24 06:08:38 +00:00
|
|
|
const items6 = [closure_6];
|
2026-07-29 08:29:29 +00:00
|
|
|
stateFromStores4 = tmp(tmp2[11]).useStateFromStores(items6, () => {
|
|
|
|
|
let tmp2 = null != activeEventOrStageInstanceChannel;
|
|
|
|
|
if (tmp2) {
|
2026-08-24 06:08:38 +00:00
|
|
|
tmp2 = closure_1_6.getAllApplicationStreamsForChannel(tmp.id).length > 0;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
2026-07-29 08:29:29 +00:00
|
|
|
return tmp2;
|
2026-07-20 16:05:17 +00:00
|
|
|
});
|
2026-07-23 10:11:24 +00:00
|
|
|
entity_type = undefined;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (guildActiveEvent != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
entity_type = guildActiveEvent.entity_type;
|
|
|
|
|
}
|
|
|
|
|
const items7 = [stateFromStores, entity_type, flag, stateFromStores3, stateFromStores4];
|
2026-08-24 06:08:38 +00:00
|
|
|
return stateFromStores3.useMemo(() => ({ hasButton: entity_type === closure_1_11.EXTERNAL || stateFromStores, hasSpeakers: stateFromStores2, hasAudience: stateFromStores3, hasStream: stateFromStores4 }), items7);
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
flag = false;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (tmp10) {
|
2026-07-20 16:05:17 +00:00
|
|
|
flag = stateFromStores2;
|
|
|
|
|
}
|
|
|
|
|
};
|