decord/source/modules/stickers/native/NativeLottieView.tsx

68 lines
2.2 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 8258
// Function ID: 8259
2026-07-20 16:05:17 +00:00
// Name: NativeLottieView
2026-08-24 06:08:38 +00:00
// Dependencies: [19, 17, 21, 500, 8259, 113, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 8258 (NativeLottieView)
import get_ActivityIndicator from "get ActivityIndicator" /* 17 */;
import jsxProd from "jsxProd" /* 21 */;
import codegenNativeCommandsDefault from "codegenNativeCommands" /* 113 */;
import __INTERNAL_VIEW_CONFIGDefault from "__INTERNAL_VIEW_CONFIG" /* 8259 */;
import noop from "noop" /* 19 */;
import closure_2 from "noop" /* 19 */;
import set from "set" /* 500 */;
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
({ useEffect: c0, useRef: closure_1 } = noop);
2026-08-24 06:08:38 +00:00
let jsx = jsxProd.jsx;
2026-07-23 10:11:24 +00:00
if (set.isAndroid()) {
2026-08-24 06:08:38 +00:00
let importDefaultResult = __INTERNAL_VIEW_CONFIGDefault;
2026-07-20 16:05:17 +00:00
} else {
2026-08-24 06:08:38 +00:00
importDefaultResult = get_ActivityIndicator.requireNativeComponent("NativeLottieNode");
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let c4 = importDefaultResult;
2026-08-24 06:08:38 +00:00
let closure_5 = codegenNativeCommandsDefault({ supportedCommands: ["setup"] });
2026-07-29 08:29:29 +00:00
let obj = { LOOP: 0, [0]: "LOOP", STILL: 1, [1]: "STILL", ONCE: 2, [2]: "ONCE" };
const result = set.fileFinishedImporting("modules/stickers/native/NativeLottieView.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default function NativeLottieView(accessibilityLabel) {
({ width, height, opacity } = accessibilityLabel);
({ asset, url } = accessibilityLabel);
2026-07-20 16:05:17 +00:00
if (opacity === undefined) {
opacity = 1;
}
2026-07-29 08:29:29 +00:00
let LOOP = accessibilityLabel.renderMode;
2026-07-20 16:05:17 +00:00
if (LOOP === undefined) {
LOOP = obj.LOOP;
}
2026-07-29 08:29:29 +00:00
let flag = accessibilityLabel.animating;
2026-07-20 16:05:17 +00:00
if (flag === undefined) {
flag = true;
}
let ref;
2026-07-29 08:29:29 +00:00
obj = undefined;
2026-08-24 06:08:38 +00:00
jsx = undefined;
2026-07-29 08:29:29 +00:00
ref = obj.useRef(null);
obj = { asset, url, width, height, animating: flag, accessibilityLabel: accessibilityLabel.accessibilityLabel };
jsx = ref(obj);
2026-07-20 16:05:17 +00:00
LOOP(() => {
2026-07-29 08:29:29 +00:00
closure_3.current = obj;
2026-07-20 16:05:17 +00:00
});
const items = [LOOP];
LOOP(() => {
2026-07-29 08:29:29 +00:00
({ asset, url, width, height, animating, accessibilityLabel } = ref.current);
let tmp2 = "" !== url;
if (tmp2) {
tmp2 = 0 !== width;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp2) {
tmp2 = 0 !== height;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (tmp2) {
2026-08-24 06:08:38 +00:00
closure_1_5.setup(ref.current, asset, url, width, height, tmp, animating, accessibilityLabel);
2026-07-20 16:05:17 +00:00
}
}, items);
2026-07-29 08:29:29 +00:00
return <closure_4 ref={ref} style={{ width, height, opacity }} />;
2026-07-20 16:05:17 +00:00
};
export const NativeLottieRenderMode = obj;