decord/alpha/source/modules/activities/utils/useIsPrivateChannelWithEnabledActivities.tsx

91 lines
2.4 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 10836
// Function ID: 10837
2026-07-20 16:05:17 +00:00
// Name: useIsPrivateChannelWithEnabledActivities
2026-10-09 10:00:15 +00:00
// Dependencies: [2064, 558, 576, 573, 2]
2026-10-03 08:58:59 +00:00
// Exports: isPrivateChannelWithEnabledActivities
2026-07-20 16:05:17 +00:00
2026-10-09 10:00:15 +00:00
// Module 10836 (useIsPrivateChannelWithEnabledActivities)
import ChannelStore from "ChannelStore" /* 2064 */;
2026-10-03 08:58:59 +00:00
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
const require = globalThis.__r;
2026-10-03 08:58:59 +00:00
let _require;
2026-10-08 09:57:35 +00:00
const tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useIsPrivateChannelWithEnabledActivities(arg0) {
2026-10-03 08:58:59 +00:00
let closure_0;
let first;
let tmp6;
let tmp7;
_require = arg0;
const obj = require("react");
const cResult = obj.c(5);
const tmp = _require;
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const items = [ChannelStore];
cResult[0] = items;
first = items;
} else {
first = cResult[0];
}
if (cResult[1] !== arg0) {
const fn = function l() {
return ChannelStore.getChannel(closure_0);
};
cResult[1] = arg0;
cResult[2] = fn;
tmp6 = fn;
} else {
tmp6 = cResult[2];
}
const tmpResult = tmp(573);
const stateFromStores = tmpResult.useStateFromStores(first, tmp6);
if (cResult[3] !== stateFromStores) {
let flag;
if (stateFromStores != null) {
flag = stateFromStores.isPrivate();
}
if (flag == null) {
flag = false;
}
cResult[3] = stateFromStores;
cResult[4] = flag;
tmp7 = flag;
} else {
tmp7 = cResult[4];
}
return tmp7;
2026-10-08 09:57:35 +00:00
}) : (function useIsPrivateChannelWithEnabledActivities(arg0) {
2026-10-03 08:58:59 +00:00
let closure_0;
_require = arg0;
const items = [ChannelStore];
2026-10-03 08:58:59 +00:00
const obj = require("useStateFromStores");
const stateFromStores = obj.useStateFromStores(items, () => ChannelStore.getChannel(closure_0));
2026-07-29 08:29:29 +00:00
let flag;
if (stateFromStores != null) {
flag = stateFromStores.isPrivate();
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (flag == null) {
flag = false;
}
return flag;
2026-10-03 08:58:59 +00:00
});
const result = size.fileFinishedImporting("modules/activities/utils/useIsPrivateChannelWithEnabledActivities.tsx");
export default tmp2;
2026-07-29 08:29:29 +00:00
export const isPrivateChannelWithEnabledActivities = function isPrivateChannelWithEnabledActivities(arg0) {
if (null == arg0) {
2026-07-20 16:05:17 +00:00
return false;
} else {
const channel = ChannelStore.getChannel(arg0);
2026-07-29 08:29:29 +00:00
let flag;
if (channel != null) {
flag = channel.isPrivate();
}
if (flag == null) {
flag = false;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return flag;
2026-07-20 16:05:17 +00:00
}
};