decord/alpha/source/modules/messages/useAllowedChatOverlays.tsx
2026-10-09 10:00:15 +00:00

111 lines
4 KiB
TypeScript

// Module ID: 10446
// Function ID: 10447
// Name: useAllowedChatOverlays
// Dependencies: [2063, 2064, 10444, 6074, 558, 576, 573, 4698, 10447, 2]
// Module 10446 (useAllowedChatOverlays)
import useStateFromStores from "useStateFromStores" /* 573 */;
import react from "react" /* 576 */;
import embeddedActivityLocationUtils from "embeddedActivityLocationUtils" /* 4698 */;
import ActivityPanelConstants from "ActivityPanelConstants" /* 6074 */;
import ChatOverlayConstants from "ChatOverlayConstants" /* 10444 */;
import isVoiceEmbeddedActivityDefault from "isVoiceEmbeddedActivity" /* 10447 */;
import EmbeddedActivitiesStore from "EmbeddedActivitiesStore" /* 2063 */;
import ChannelStore from "ChannelStore" /* 2064 */;
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
let items;
const ChatOverlays = ChatOverlayConstants.ChatOverlays;
const ActivityPanelModes = ActivityPanelConstants.ActivityPanelModes;
const no_text_activity = "no_text_activity";
let obj = { no_text_activity: items };
items = [, , ];
({ NEW_MESSAGES: arr[0], OPT_IN_CHANNEL: arr[1], SUMMARIES: arr[2] } = ChatOverlays);
let items1 = [, , ];
({ NEW_MESSAGES: arr2[0], OPT_IN_CHANNEL: arr2[1], SUMMARIES: arr2[2] } = ChatOverlays);
obj[ActivityPanelModes.DISCONNECTED] = items1;
const items2 = [, , ];
({ NEW_MESSAGES: arr3[0], OPT_IN_CHANNEL: arr3[1], SUMMARIES: arr3[2] } = ChatOverlays);
obj[ActivityPanelModes.LAUNCHING_WITH_ORIENTATION_CHANGE] = items2;
obj[ActivityPanelModes.PANEL] = [];
const items3 = [, , ];
({ NEW_MESSAGES: arr4[0], OPT_IN_CHANNEL: arr4[1], SUMMARIES: arr4[2] } = ChatOverlays);
obj[ActivityPanelModes.PIP] = items3;
const items4 = [, , ];
({ NEW_MESSAGES: arr5[0], OPT_IN_CHANNEL: arr5[1], SUMMARIES: arr5[2] } = ChatOverlays);
obj[ActivityPanelModes.ACTIVITY_POPOUT_WINDOW] = items4;
const tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useAllowedChatOverlays() {
let tmp4;
let tmp5;
let tmp8;
let tmp9;
obj = react;
const cResult = obj.c(4);
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const items = [EmbeddedActivitiesStore];
class E {
constructor() {
return closure_1_3.getCurrentEmbeddedActivity();
}
}
cResult[0] = items;
cResult[1] = E;
tmp4 = items;
tmp5 = E;
} else {
[tmp4, tmp5] = cResult;
}
const tmpResult = useStateFromStores;
const stateFromStores = tmpResult.useStateFromStores(tmp4, tmp5);
if (cResult[2] === Symbol.for("react.memo_cache_sentinel")) {
const items1 = [EmbeddedActivitiesStore];
class E {
constructor() {
return closure_1_3.getCurrentEmbeddedActivity();
}
}
cResult[2] = items1;
cResult[3] = tmp11;
tmp9 = tmp11;
tmp8 = items1;
} else {
tmp8 = cResult[2];
tmp9 = cResult[3];
}
const tmpResult3 = useStateFromStores;
const stateFromStores1 = tmpResult3.useStateFromStores(tmp8, tmp9);
embeddedActivityLocationUtils;
if (stateFromStores != null) {
const _location = stateFromStores.location;
}
if (undefined !== stateFromStores) {
class E {
constructor() {
return closure_1_3.getCurrentEmbeddedActivity();
}
}
}
}) : (function useAllowedChatOverlays() {
obj = useStateFromStores;
const items = [EmbeddedActivitiesStore];
const stateFromStores = obj.useStateFromStores(items, () => EmbeddedActivitiesStore.getCurrentEmbeddedActivity());
const items1 = [EmbeddedActivitiesStore];
const obj2 = useStateFromStores;
const stateFromStores1 = obj2.useStateFromStores(items1, () => EmbeddedActivitiesStore.getActivityPanelMode());
embeddedActivityLocationUtils;
if (stateFromStores != null) {
const _location = stateFromStores.location;
}
if (undefined !== stateFromStores) {
let tmp9;
if (!isVoiceEmbeddedActivityDefault(tmp5, ChannelStore)) {
tmp9 = obj[stateFromStores1];
}
return tmp9;
}
tmp9 = obj[no_text_activity];
});
const result = size.fileFinishedImporting("modules/messages/useAllowedChatOverlays.tsx");
export default tmp2;