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

78 lines
2.1 KiB
TypeScript
Raw Normal View History

2026-08-05 07:35:12 +00:00
// Module ID: 7888
// Function ID: 7889
2026-07-20 16:05:17 +00:00
// Name: NativeLottieView
2026-08-05 07:35:12 +00:00
// Dependencies: [19, 17, 21, 500, 7889, 113, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-08-05 07:35:12 +00:00
// Module 7888 (NativeLottieView)
2026-07-29 08:29:29 +00:00
import noop from "noop";
import closure_2 from "noop";
2026-07-23 10:11:24 +00:00
import { jsx } from "jsxProd";
import set from "set";
import set from "jsxProd";
2026-07-29 08:29:29 +00:00
let c0;
2026-07-23 10:11:24 +00:00
let closure_1;
2026-07-29 08:29:29 +00:00
({ useEffect: c0, useRef: closure_1 } = noop);
2026-07-23 10:11:24 +00:00
if (set.isAndroid()) {
let importDefaultResult = require("__INTERNAL_VIEW_CONFIG");
2026-07-20 16:05:17 +00:00
} else {
2026-07-23 10:11:24 +00:00
importDefaultResult = require("get ActivityIndicator").requireNativeComponent("NativeLottieNode");
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let c4 = importDefaultResult;
2026-07-23 10:11:24 +00:00
let closure_5 = require("codegenNativeCommands")({ 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) {
2026-07-20 16:05:17 +00:00
let asset;
let height;
let opacity;
let url;
let width;
2026-07-29 08:29:29 +00:00
({ 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-07-20 16:05:17 +00:00
let jsx;
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(() => {
let accessibilityLabel;
let animating;
let asset;
let height;
let url;
let width;
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) {
outer1_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;