2026-09-28 16:18:32 +00:00
|
|
|
// Module ID: 8933
|
|
|
|
|
// Function ID: 8934
|
2026-09-18 19:45:33 +00:00
|
|
|
// Name: useEmbeddedActivityBackground
|
2026-09-28 16:18:32 +00:00
|
|
|
// Dependencies: [32, 19, 7595, 2]
|
2026-09-26 17:57:22 +00:00
|
|
|
// Exports: default
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-09-28 16:18:32 +00:00
|
|
|
// Module 8933 (useEmbeddedActivityBackground)
|
2026-10-01 14:13:23 +00:00
|
|
|
import _slicedToArray_mod from "_slicedToArray" /* 32 */;
|
|
|
|
|
import react_mod from "react" /* 19 */;
|
|
|
|
|
import size from "module_2" /* 2 */;
|
2026-09-18 19:45:33 +00:00
|
|
|
|
2026-10-01 14:13:23 +00:00
|
|
|
let _slicedToArray = _slicedToArray_mod;
|
|
|
|
|
let react = react_mod;
|
2026-09-18 19:45:33 +00:00
|
|
|
let closure_4 = ["embedded_cover", "embedded_background"];
|
|
|
|
|
const result = size.fileFinishedImporting("modules/activities/utils/useEmbeddedActivityBackground.tsx");
|
|
|
|
|
|
2026-09-26 17:57:22 +00:00
|
|
|
export default function useEmbeddedActivityBackground(applicationId) {
|
2026-10-01 14:13:23 +00:00
|
|
|
let c2;
|
|
|
|
|
let closure_3;
|
|
|
|
|
let first;
|
|
|
|
|
let names;
|
|
|
|
|
let ref;
|
|
|
|
|
let tmp2;
|
2026-09-18 19:45:33 +00:00
|
|
|
applicationId = applicationId.applicationId;
|
|
|
|
|
({ size, names } = applicationId);
|
|
|
|
|
if (names === undefined) {
|
|
|
|
|
names = ref;
|
|
|
|
|
}
|
|
|
|
|
let str = applicationId.format;
|
|
|
|
|
if (str === undefined) {
|
|
|
|
|
str = "png";
|
|
|
|
|
}
|
|
|
|
|
_slicedToArray = undefined;
|
2026-10-01 14:13:23 +00:00
|
|
|
react = undefined;
|
2026-09-18 19:45:33 +00:00
|
|
|
ref = undefined;
|
2026-10-01 14:13:23 +00:00
|
|
|
let obj = react;
|
|
|
|
|
const tmp = _slicedToArray(react.useState(null), 2);
|
|
|
|
|
[tmp2, c2] = tmp;
|
|
|
|
|
[first, react] = react.useState(true);
|
|
|
|
|
const obj2 = applicationId(names[2]);
|
|
|
|
|
const url = obj2.getAssetImage(applicationId, tmp2, size, str);
|
2026-09-26 17:57:22 +00:00
|
|
|
let state = "loading";
|
2026-10-01 14:13:23 +00:00
|
|
|
if (!first) {
|
2026-09-18 19:45:33 +00:00
|
|
|
let str3 = "not-found";
|
|
|
|
|
if (null != url) {
|
|
|
|
|
str3 = "fetched";
|
|
|
|
|
}
|
|
|
|
|
state = str3;
|
|
|
|
|
}
|
|
|
|
|
ref = obj.useRef(names);
|
|
|
|
|
const effect = obj.useEffect(() => {
|
2026-10-01 14:13:23 +00:00
|
|
|
ref.current = names;
|
2026-09-18 19:45:33 +00:00
|
|
|
});
|
|
|
|
|
const items = [applicationId];
|
|
|
|
|
const effect1 = obj.useEffect(() => {
|
|
|
|
|
const current = ref.current;
|
|
|
|
|
if (null != current) {
|
2026-10-01 14:13:23 +00:00
|
|
|
const tmp3 = names;
|
|
|
|
|
let obj = applicationId(names[2]);
|
|
|
|
|
const assets = obj.getAssets(tmp);
|
2026-09-18 19:45:33 +00:00
|
|
|
assets.then((result) => {
|
2026-10-01 14:13:23 +00:00
|
|
|
let tmp6;
|
2026-09-18 19:45:33 +00:00
|
|
|
closure_3(false);
|
|
|
|
|
const entries = Object.entries(result);
|
|
|
|
|
const obj = entries[Symbol.iterator]();
|
|
|
|
|
while (obj !== undefined) {
|
|
|
|
|
let tmp5 = _slicedToArray(tmp3, 2);
|
|
|
|
|
[r10020, tmp6] = tmp5;
|
|
|
|
|
let tmp7 = tmp6;
|
|
|
|
|
if (null != tmp6) {
|
|
|
|
|
if ("" !== tmp7.id) {
|
|
|
|
|
if (current.includes(tmp7.name)) {
|
|
|
|
|
let tmp12 = c2(tmp6.id);
|
|
|
|
|
obj.return();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
continue;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}, items);
|
|
|
|
|
return { url, state };
|
2026-09-26 17:57:22 +00:00
|
|
|
};
|