decord/beta/source/modules/activities/native/EmbeddedActivityBackgroundImageWithOverlay.tsx

229 lines
6.6 KiB
TypeScript
Raw Permalink Normal View History

2026-10-12 16:32:48 +00:00
// Module ID: 10961
// Function ID: 10962
// Name: EmbeddedActivityBackgroundImageWithOverlay
2026-10-12 16:32:48 +00:00
// Dependencies: [32, 19, 17, 21, 5092, 587, 558, 576, 10962, 6157, 2]
2026-10-12 16:32:48 +00:00
// Module 10961 (EmbeddedActivityBackgroundImageWithOverlay)
2026-10-02 13:37:24 +00:00
import react2 from "react" /* 576 */;
2026-10-07 22:43:51 +00:00
import nativeDefault from "native" /* 587 */;
2026-10-12 16:32:48 +00:00
import useEmbeddedActivityBackgroundDefault from "useEmbeddedActivityBackground" /* 10962 */;
2026-10-01 14:13:23 +00:00
import _slicedToArray from "_slicedToArray" /* 32 */;
import react from "react" /* 19 */;
import react_native from "react-native" /* 17 */;
2026-10-12 16:32:48 +00:00
import Fragment from "Fragment" /* 21 */;
import createStyles from "createStyles" /* 5092 */;
2026-10-02 13:37:24 +00:00
import ReactCompilerGating from "ReactCompilerGating" /* 558 */;
2026-10-12 16:32:48 +00:00
import size_mod from "module_2" /* 2 */;
2026-10-01 14:13:23 +00:00
let hasOwnProperty;
2026-10-12 16:32:48 +00:00
let metroImportAll;
2026-10-02 13:37:24 +00:00
let metroImportDefault;
2026-10-01 14:13:23 +00:00
let metroRequire;
let obj2;
2026-10-12 16:32:48 +00:00
let tmp8;
const FastImageDefault = tmp8(6157);
({ View: hasOwnProperty, StyleSheet: metroRequire } = react_native);
({ jsx: metroImportDefault, jsxs: metroImportAll } = Fragment);
2026-10-01 14:13:23 +00:00
let obj = { overlay: obj2 };
obj2 = { flex: 1, opacity: 0.6, backgroundColor: nativeDefault.colors.BLACK };
2026-10-02 13:37:24 +00:00
let closure_9 = createStyles.createStyles(obj);
const names = ["embedded_background"];
2026-10-12 16:32:48 +00:00
let tmp4 = ReactCompilerGating.isReactCompilerEnabled() ? (function EmbeddedActivityBackgroundImageWithOverlay(arg0) {
2026-10-02 13:37:24 +00:00
let application;
let borderRadius;
let closure_129_0;
let dimensionsStyle;
2026-10-12 16:32:48 +00:00
let height;
let items;
let items1;
let items2;
2026-10-02 13:37:24 +00:00
let resizeMode;
2026-10-12 16:32:48 +00:00
let tmp10;
let tmp11;
2026-10-02 13:37:24 +00:00
let tmp5;
let tmp6;
2026-10-12 16:32:48 +00:00
let width;
2026-10-02 13:37:24 +00:00
const obj = react2;
2026-10-12 16:32:48 +00:00
const cResult = obj.c(16);
2026-10-02 13:37:24 +00:00
({ application, dimensionsStyle, borderRadius, resizeMode } = arg0);
let str = "contain";
if (undefined !== resizeMode) {
str = resizeMode;
}
const tmp3 = closure_9();
[tmp5, closure_129_0] = react.useState(false);
let str2;
_slicedToArray(react.useState(false), 2);
if (application != null) {
str2 = application.id;
}
if (str2 == null) {
str2 = "";
}
if (cResult[0] !== str2) {
const obj2 = { applicationId: str2, names, size: 1024 };
cResult[0] = str2;
cResult[1] = obj2;
tmp6 = obj2;
} else {
tmp6 = cResult[1];
}
const url = useEmbeddedActivityBackgroundDefault(tmp6).url;
if (cResult[2] !== url) {
const obj3 = { uri: url };
cResult[2] = url;
cResult[3] = obj3;
2026-10-12 16:32:48 +00:00
tmp10 = obj3;
} else {
tmp10 = cResult[3];
}
if (cResult[4] !== dimensionsStyle) {
let flattenResult = metroRequire.flatten(dimensionsStyle);
if (flattenResult == null) {
flattenResult = {};
}
cResult[4] = dimensionsStyle;
cResult[5] = flattenResult;
tmp11 = flattenResult;
2026-10-02 13:37:24 +00:00
} else {
2026-10-12 16:32:48 +00:00
tmp11 = cResult[5];
2026-10-02 13:37:24 +00:00
}
2026-10-12 16:32:48 +00:00
({ width, height } = tmp11);
if (cResult[6] === tmp10) {
if (cResult[7] === url) {
if (cResult[8] === borderRadius) {
if (cResult[9] === dimensionsStyle) {
if (cResult[10] === height) {
if (cResult[11] === tmp5) {
if (cResult[12] === str) {
if (cResult[13] === tmp3) {
let tmp13;
if (cResult[14] === width) {
tmp13 = cResult[15];
}
return tmp13;
}
2026-10-02 13:37:24 +00:00
}
}
}
}
}
}
}
2026-10-12 16:32:48 +00:00
let tmp18Result = null;
2026-10-02 13:37:24 +00:00
if (!tmp5) {
2026-10-12 16:32:48 +00:00
tmp18Result = null;
2026-10-02 13:37:24 +00:00
if (null != url) {
2026-10-12 16:32:48 +00:00
tmp18Result = null;
2026-10-02 13:37:24 +00:00
if ("" !== url) {
2026-10-12 16:32:48 +00:00
let absoluteFillObject = dimensionsStyle;
const tmp18 = metroImportAll;
if (dimensionsStyle == null) {
absoluteFillObject = metroRequire.absoluteFillObject;
}
const obj5 = {
2026-10-02 13:37:24 +00:00
resizeMode: str,
2026-10-12 16:32:48 +00:00
source: tmp10,
style: items,
2026-10-02 13:37:24 +00:00
onError() {
return closure_1_0(true);
2026-10-12 16:32:48 +00:00
}
2026-10-02 13:37:24 +00:00
};
2026-10-12 16:32:48 +00:00
items = [metroRequire.absoluteFill, ];
size = { width, height, borderRadius };
const obj4 = { style: absoluteFillObject, children: items1 };
items[1] = size;
items1 = [metroImportDefault(FastImageDefault, obj5), ];
const obj6 = { style: items2 };
items2 = [tmp3.overlay, ];
2026-10-02 13:37:24 +00:00
const obj7 = { borderRadius };
2026-10-12 16:32:48 +00:00
items2[1] = obj7;
items1[1] = metroImportDefault(hasOwnProperty, obj6);
tmp18Result = tmp18(tmp19, obj4);
2026-10-02 13:37:24 +00:00
}
}
}
2026-10-12 16:32:48 +00:00
cResult[6] = tmp10;
cResult[7] = url;
cResult[8] = borderRadius;
cResult[9] = dimensionsStyle;
cResult[10] = height;
cResult[11] = tmp5;
cResult[12] = str;
cResult[13] = tmp3;
cResult[14] = width;
cResult[15] = tmp18Result;
tmp13 = tmp18Result;
}) : (function EmbeddedActivityBackgroundImageWithOverlay(arg0) {
2026-10-01 14:13:23 +00:00
let application;
let borderRadius;
2026-10-12 16:32:48 +00:00
let c0;
2026-10-01 14:13:23 +00:00
let dimensionsStyle;
2026-10-12 16:32:48 +00:00
let items;
let items1;
let items2;
2026-10-01 14:13:23 +00:00
let resizeMode;
2026-10-12 16:32:48 +00:00
let tmp3;
({ application, dimensionsStyle, borderRadius, resizeMode } = arg0);
if (resizeMode === undefined) {
resizeMode = "contain";
}
2026-10-12 16:32:48 +00:00
c0 = undefined;
2026-10-02 13:37:24 +00:00
const tmp = closure_9();
2026-10-12 16:32:48 +00:00
[tmp3, c0] = react.useState(false);
2026-10-01 14:13:23 +00:00
let str;
2026-10-12 16:32:48 +00:00
_slicedToArray(react.useState(false), 2);
const tmp6 = useEmbeddedActivityBackgroundDefault;
if (application != null) {
str = application.id;
}
if (str == null) {
str = "";
}
2026-10-01 14:13:23 +00:00
const obj = { applicationId: str, names, size: 1024 };
2026-10-12 16:32:48 +00:00
const url = tmp6(obj).url;
let flattenResult = metroRequire.flatten(dimensionsStyle);
const tmp7 = url;
if (flattenResult == null) {
flattenResult = {};
}
let tmp13Result = null;
if (!tmp3) {
tmp13Result = null;
if (null != url) {
2026-10-12 16:32:48 +00:00
tmp13Result = null;
if ("" !== url) {
2026-10-12 16:32:48 +00:00
let absoluteFillObject = dimensionsStyle;
const tmp13 = metroImportAll;
if (dimensionsStyle == null) {
absoluteFillObject = tmp8.absoluteFillObject;
}
const obj3 = {
2026-10-01 14:13:23 +00:00
resizeMode,
2026-10-12 16:32:48 +00:00
source: { uri: tmp7 },
style: items,
2026-10-01 14:13:23 +00:00
onError() {
2026-10-12 16:32:48 +00:00
return _undefined(true);
}
2026-10-01 14:13:23 +00:00
};
2026-10-12 16:32:48 +00:00
items = [metroRequire.absoluteFill, ];
size = { width: tmp9, height: tmp10, borderRadius };
const obj2 = { style: absoluteFillObject, children: items1 };
items[1] = size;
items1 = [metroImportDefault(FastImageDefault, obj3), ];
const obj4 = { style: items2 };
items2 = [tmp.overlay, ];
const obj5 = { borderRadius };
items2[1] = obj5;
items1[1] = metroImportDefault(hasOwnProperty, obj4);
tmp13Result = tmp13(tmp14, obj2);
}
}
}
2026-10-12 16:32:48 +00:00
return tmp13Result;
2026-10-02 13:37:24 +00:00
});
2026-10-12 16:32:48 +00:00
let size = size_mod;
2026-10-02 13:37:24 +00:00
const result = size.fileFinishedImporting("modules/activities/native/EmbeddedActivityBackgroundImageWithOverlay.tsx");
2026-10-12 16:32:48 +00:00
export default tmp4;