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

72 lines
2 KiB
TypeScript
Raw Normal View History

2026-10-08 09:57:35 +00:00
// Module ID: 10732
// Function ID: 10733
2026-07-20 16:05:17 +00:00
// Name: useCurrentEmbeddedApplication
2026-10-08 09:57:35 +00:00
// Dependencies: [32, 558, 576, 10733, 6847, 2]
2026-07-20 16:05:17 +00:00
2026-10-08 09:57:35 +00:00
// Module 10732 (useCurrentEmbeddedApplication)
2026-10-03 08:58:59 +00:00
import react from "react" /* 576 */;
2026-10-08 09:57:35 +00:00
import useCurrentEmbeddedActivityDefault from "useCurrentEmbeddedActivity" /* 10733 */;
2026-10-03 08:58:59 +00:00
import _slicedToArray from "_slicedToArray" /* 32 */;
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-10-03 08:58:59 +00:00
let tmp5;
2026-10-08 09:57:35 +00:00
const useGetOrFetchApplicationsDefault = tmp5(6847);
let tmp2 = ReactCompilerGating.isReactCompilerEnabled() ? (function useCurrentEmbeddedApplication(arg0) {
2026-10-03 08:58:59 +00:00
let tmp3;
let tmp7;
const obj = react;
const cResult = obj.c(4);
if (cResult[0] !== arg0) {
let obj2 = arg0;
if (undefined === arg0) {
obj2 = {};
}
cResult[0] = arg0;
cResult[1] = obj2;
tmp3 = obj2;
} else {
tmp3 = cResult[1];
}
const fetchesApplication = tmp3.fetchesApplication;
const tmp4 = undefined === fetchesApplication || fetchesApplication;
const tmp6 = useCurrentEmbeddedActivityDefault();
if (cResult[2] !== tmp6) {
let items;
if (null == tmp6) {
items = [];
} else {
items = [tmp6.applicationId];
}
cResult[2] = tmp6;
cResult[3] = items;
tmp7 = items;
} else {
tmp7 = cResult[3];
}
const first = _slicedToArray(useGetOrFetchApplicationsDefault(tmp7, tmp4), 1)[0];
return first;
2026-10-08 09:57:35 +00:00
}) : (function useCurrentEmbeddedApplication() {
2026-10-03 08:58:59 +00:00
let items;
2026-07-20 16:05:17 +00:00
let obj = arg0;
if (arg0 === undefined) {
obj = {};
}
let flag = obj.fetchesApplication;
if (flag === undefined) {
flag = true;
}
2026-08-24 06:08:38 +00:00
const tmp = useCurrentEmbeddedActivityDefault();
2026-10-03 08:58:59 +00:00
const tmp2 = useGetOrFetchApplicationsDefault;
2026-07-20 16:05:17 +00:00
if (null == tmp) {
2026-10-03 08:58:59 +00:00
items = [];
2026-07-20 16:05:17 +00:00
} else {
items = [tmp.applicationId];
}
2026-10-03 08:58:59 +00:00
const first = _slicedToArray(tmp2(items, flag), 1)[0];
2026-07-29 08:29:29 +00:00
return first;
2026-10-03 08:58:59 +00:00
});
const result = size.fileFinishedImporting("modules/activities/utils/useCurrentEmbeddedApplication.tsx");
export default tmp2;