decord/source/modules/premium/native/gifting/PremiumGiftBackgroundAnimation.android.tsx

160 lines
5.4 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 8822
// Function ID: 69604
2026-07-20 16:05:17 +00:00
// Name: PremiumGiftBackgroundAnimation
2026-07-24 07:16:23 +00:00
// Dependencies: [57, 31, 27, 4122, 33, 4130, 566, 7851, 8823, 5453, 2]
2026-07-20 16:05:17 +00:00
// Exports: default
2026-07-24 07:16:23 +00:00
// Module 8822 (PremiumGiftBackgroundAnimation)
2026-07-23 10:11:24 +00:00
import _slicedToArray from "_slicedToArray";
import result from "result";
import { View } from "get ActivityIndicator";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
import jsxProd from "jsxProd";
import _createForOfIteratorHelperLoose from "_createForOfIteratorHelperLoose";
let closure_7;
let closure_8;
const require = arg1;
({ jsx: closure_7, jsxs: closure_8 } = jsxProd);
let closure_9 = _createForOfIteratorHelperLoose.createStyles({ container: { display: "flex", alignItems: "flex-end", justifyContent: "center", flexDirection: "row" }, consistentHeight: { height: 300 }, animation: { maxWidth: 375, width: "100%", height: "auto" }, baseAnimation: { position: "absolute", bottom: 0 }, lottie: { height: 275 } });
const result = require("get ActivityIndicator").fileFinishedImporting("modules/premium/native/gifting/PremiumGiftBackgroundAnimation.android.tsx");
2026-07-20 16:05:17 +00:00
export default function PremiumGiftBackgroundAnimation(giftStyle) {
giftStyle = giftStyle.giftStyle;
let consistentHeight = giftStyle.withConsistentHeight;
2026-07-23 10:11:24 +00:00
const tmp = callback();
let obj = giftStyle(ref[6]);
const items = [first1];
2026-07-20 16:05:17 +00:00
const stateFromStores = obj.useStateFromStores(items, () => first1.useReducedMotion);
2026-07-23 10:11:24 +00:00
ref = first.useRef(null);
const ref1 = first.useRef(null);
const tmp5 = ref1(first.useState(giftStyle(ref[7]).AnimationState.ACTION), 2);
first = tmp5[0];
2026-07-20 16:05:17 +00:00
let closure_5 = tmp5[1];
2026-07-23 10:11:24 +00:00
const tmp7 = ref1(first.useState(undefined), 2);
first1 = tmp7[0];
2026-07-20 16:05:17 +00:00
let closure_7 = tmp7[1];
2026-07-23 10:11:24 +00:00
const tmp9 = ref1(first.useState(undefined), 2);
2026-07-20 16:05:17 +00:00
const first2 = tmp9[0];
2026-07-23 10:11:24 +00:00
callback = tmp9[1];
const tmp11 = ref1(first.useState(false), 2);
2026-07-20 16:05:17 +00:00
const first3 = tmp11[0];
let closure_11 = tmp11[1];
const items1 = [giftStyle];
const items2 = [giftStyle];
2026-07-23 10:11:24 +00:00
const memo = first.useMemo(() => giftStyle(ref[8]).getGiftAnimationData(giftStyle, giftStyle(ref[7]).AnimationState.ACTION), items1);
const memo1 = first.useMemo(() => giftStyle(ref[8]).getGiftAnimationData(giftStyle, giftStyle(ref[7]).AnimationState.LOOP), items2);
let obj1 = giftStyle(ref[8]);
2026-07-20 16:05:17 +00:00
const lottieType = obj1.getLottieType(giftStyle);
const items3 = [first2, first1, giftStyle, first];
2026-07-23 10:11:24 +00:00
const memo2 = first.useMemo(() => {
2026-07-20 16:05:17 +00:00
if (first1 !== giftStyle) {
callback2(giftStyle);
let tmp8 = first !== giftStyle(ref[7]).AnimationState.LOOP;
if (tmp8) {
tmp8 = null != first2;
}
closure_11(tmp8);
callback(giftStyle(ref[7]).AnimationState.ACTION);
const tmp4 = closure_11;
}
}, items3);
const items4 = [first, first3];
const items5 = [first];
2026-07-23 10:11:24 +00:00
callback = first.useCallback((arg0) => {
2026-07-20 16:05:17 +00:00
if (first3) {
callback4(false);
} else {
if (!tmp4) {
callback3(giftStyle(ref[7]).AnimationState.ACTION);
callback(giftStyle(ref[7]).AnimationState.LOOP);
}
2026-07-23 10:11:24 +00:00
tmp4 = first === giftStyle(ref[7]).AnimationState.LOOP || arg0;
2026-07-20 16:05:17 +00:00
}
}, items4);
2026-07-23 10:11:24 +00:00
const effect = first.useEffect(() => {
2026-07-20 16:05:17 +00:00
if (first === giftStyle(ref[7]).AnimationState.LOOP) {
const current2 = ref.current;
if (null != current2) {
current2.reset();
}
} else {
const current = ref1.current;
if (null != current) {
current.reset();
}
}
}, items5);
const items6 = [stateFromStores];
2026-07-23 10:11:24 +00:00
const effect1 = first.useEffect(() => {
2026-07-20 16:05:17 +00:00
if (stateFromStores) {
const current = ref.current;
if (null != current) {
current.reset();
}
}
}, items6);
obj = {};
const items7 = [tmp.container, ];
if (consistentHeight) {
consistentHeight = tmp.consistentHeight;
}
items7[1] = consistentHeight;
obj.style = items7;
obj = {};
const items8 = [, , , ];
({ baseAnimation: arr9[0], animation: arr9[1] } = tmp);
const tmp20 = first2;
const tmp21 = closure_5;
const tmp22 = closure_7;
2026-07-23 10:11:24 +00:00
const tmp23 = stateFromStores(ref[9]);
items8[2] = lottieType === giftStyle(ref[8]).LottieType.LOTTIE && tmp.lottie;
2026-07-20 16:05:17 +00:00
obj1 = {};
let num = 0;
if (first1 === giftStyle) {
num = 0;
2026-07-23 10:11:24 +00:00
if (first !== giftStyle(ref[7]).AnimationState.LOOP) {
2026-07-20 16:05:17 +00:00
num = 1;
}
}
obj1.opacity = num;
items8[3] = obj1;
obj.style = items8;
2026-07-23 10:11:24 +00:00
obj.hardwareAccelerationAndroid = lottieType === giftStyle(ref[8]).LottieType.LOTTIE;
2026-07-20 16:05:17 +00:00
obj.ref = ref;
obj.source = memo;
obj.autoPlay = !stateFromStores;
obj.onAnimationFinish = callback;
obj.loop = false;
const items9 = [tmp22(tmp23, obj), ];
const obj2 = {};
const items10 = [tmp.animation, , ];
2026-07-23 10:11:24 +00:00
const tmp24 = lottieType === giftStyle(ref[8]).LottieType.LOTTIE && tmp.lottie;
2026-07-20 16:05:17 +00:00
const tmp28 = closure_7;
2026-07-23 10:11:24 +00:00
const tmp29 = stateFromStores(ref[9]);
items10[1] = lottieType === giftStyle(ref[8]).LottieType.LOTTIE && tmp.lottie;
2026-07-20 16:05:17 +00:00
const obj3 = {};
let num2 = 0;
if (first1 === giftStyle) {
num2 = 0;
2026-07-23 10:11:24 +00:00
if (first === giftStyle(ref[7]).AnimationState.LOOP) {
2026-07-20 16:05:17 +00:00
num2 = 1;
}
}
obj3.opacity = num2;
items10[2] = obj3;
obj2.style = items10;
2026-07-23 10:11:24 +00:00
obj2.hardwareAccelerationAndroid = lottieType === giftStyle(ref[8]).LottieType.LOTTIE;
2026-07-20 16:05:17 +00:00
obj2.ref = ref1;
obj2.source = memo1;
let tmp33 = !stateFromStores;
if (tmp33) {
2026-07-23 10:11:24 +00:00
tmp33 = first === giftStyle(ref[7]).AnimationState.LOOP;
2026-07-20 16:05:17 +00:00
}
obj2.autoPlay = tmp33;
obj2.loop = true;
items9[1] = tmp28(tmp29, obj2);
obj.children = items9;
return tmp20(tmp21, obj);
};