decord/beta/source/modules/calls/useCallA11yState.tsx

72 lines
2.2 KiB
TypeScript
Raw Permalink Normal View History

2026-10-12 16:32:48 +00:00
// Module ID: 16467
// Function ID: 16468
// Name: useCallA11yState
2026-10-12 16:32:48 +00:00
// Dependencies: [502, 5758, 558, 576, 504, 2]
2026-10-12 16:32:48 +00:00
// Module 16467 (useCallA11yState)
import AuthenticationStore from "AuthenticationStore" /* 502 */;
2026-10-12 16:32:48 +00:00
import CallStore from "CallStore" /* 5758 */;
2026-10-02 13:37:24 +00:00
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
2026-10-01 14:13:23 +00:00
import size from "module_2" /* 2 */;
const require = globalThis.__r;
2026-10-01 14:13:23 +00:00
let _require;
2026-10-12 16:32:48 +00:00
const tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useCallA11yState(arg0) {
2026-10-02 13:37:24 +00:00
let closure_0;
let first;
let tmp7;
_require = arg0;
const tmp = _require;
const obj = require("react");
const cResult = obj.c(3);
if (cResult[0] === Symbol.for("react.memo_cache_sentinel")) {
const items = [CallStore, AuthenticationStore];
cResult[0] = items;
first = items;
} else {
first = cResult[0];
}
if (cResult[1] !== arg0) {
const fn = function u() {
const call = CallStore.getCall(closure_0);
const id = AuthenticationStore.getId();
let hasItem = null != call && null != id;
if (hasItem) {
const ringing = call.ringing;
hasItem = ringing.includes(id);
}
const obj2 = { isIncomingCall: hasItem, isOngoingCall: CallStore.isCallActive(closure_0) && !hasItem };
CallStore.isCallActive(closure_0) && !hasItem;
return obj2;
};
cResult[1] = arg0;
cResult[2] = fn;
tmp7 = fn;
} else {
tmp7 = cResult[2];
}
const tmpResult = tmp(504);
return tmpResult.useStateFromStoresObject(first, tmp7);
2026-10-12 16:32:48 +00:00
}) : (function useCallA11yState(arg0) {
2026-10-01 14:13:23 +00:00
let closure_0;
_require = arg0;
2026-10-01 14:13:23 +00:00
const obj = require("get initialized");
const items = [CallStore, AuthenticationStore];
2026-10-01 14:13:23 +00:00
return obj.useStateFromStoresObject(items, () => {
const call = CallStore.getCall(closure_0);
const id = AuthenticationStore.getId();
let hasItem = null != call && null != id;
if (hasItem) {
const ringing = call.ringing;
hasItem = ringing.includes(id);
}
const obj2 = { isIncomingCall: hasItem, isOngoingCall: CallStore.isCallActive(closure_0) && !hasItem };
2026-10-01 14:13:23 +00:00
CallStore.isCallActive(closure_0) && !hasItem;
return obj2;
});
2026-10-02 13:37:24 +00:00
});
const result = size.fileFinishedImporting("modules/calls/useCallA11yState.tsx");
export default tmp2;