98 lines
3.3 KiB
TypeScript
98 lines
3.3 KiB
TypeScript
// Metro module 6138 (f6139).
|
|
import { useState, useEffect } from "react";
|
|
import AccessibilityStore from "../../../a11y/AccessibilityStore";
|
|
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
|
|
import { useStateFromStores } from "../../../../_bundle/Module589";
|
|
import * as _ReanimatedRexport from "../../../reanimated/ReanimatedRexport";
|
|
import ReanimatedRexport, { useAnimatedStyle } from "../../../reanimated/ReanimatedRexport";
|
|
import * as _timing from "../../../../design/animation/reanimated/timing/timing";
|
|
import LottieAnimationView from "../../../../components_native/common/LottieAnimationView";
|
|
const useStyles = createStyles({
|
|
content: {
|
|
width: "100%"
|
|
}
|
|
});
|
|
const __initData = {
|
|
code: "function FadeOutLottieAnimationTsx1(){const{isAnimationComplete,isFadeOut,withTiming,runOnJS,setIsFadeOut}=this.__closure;if(!isAnimationComplete){return{opacity:1};}if(isFadeOut){return{opacity:withTiming(0,{duration:300},'respect-motion-settings',function(finished){if(finished)runOnJS(setIsFadeOut)(false);})};}return{opacity:0};}"
|
|
};
|
|
const __initData2 = {
|
|
code: "function FadeOutLottieAnimationTsx2(finished){const{runOnJS,setIsFadeOut}=this.__closure;if(finished)runOnJS(setIsFadeOut)(false);}"
|
|
};
|
|
export default function FadeOutLottieAnimation(props) {
|
|
let r55;
|
|
let onComplete, state, setState, state2, setState2;
|
|
L5: {
|
|
onComplete = props.onComplete;
|
|
const { onComplete: _onComplete, ...props2 } = props;
|
|
state = void 0;
|
|
setState = void 0;
|
|
state2 = void 0;
|
|
setState2 = void 0;
|
|
const styles = useStyles();
|
|
[state, setState] = useState(false);
|
|
[state2, setState2] = useState(true);
|
|
const stateFromStores = useStateFromStores([AccessibilityStore], () => AccessibilityStore.useReducedMotion);
|
|
useEffect(() => {
|
|
setState(false);
|
|
}, []);
|
|
const T = function T() {
|
|
let r18, r19;
|
|
if (state) {
|
|
if (state2) {
|
|
const t = function t(a0) {
|
|
if (a0) {
|
|
_ReanimatedRexport.runOnJS(setState2)(false);
|
|
}
|
|
};
|
|
t.__closure = {
|
|
runOnJS: _ReanimatedRexport.runOnJS,
|
|
setIsFadeOut: setState2
|
|
};
|
|
t.__workletHash = 14133863353798;
|
|
t.__initData = __initData2;
|
|
r19 = {
|
|
opacity: _timing.withTiming(0, {
|
|
duration: 300
|
|
}, "respect-motion-settings", t)
|
|
};
|
|
} else {
|
|
r19 = {
|
|
opacity: 0
|
|
};
|
|
}
|
|
r18 = r19;
|
|
} else {
|
|
r18 = {
|
|
opacity: 1
|
|
};
|
|
}
|
|
return r18;
|
|
};
|
|
T.__closure = {
|
|
isAnimationComplete: state,
|
|
isFadeOut: state2,
|
|
withTiming: _timing.withTiming,
|
|
runOnJS: _ReanimatedRexport.runOnJS,
|
|
setIsFadeOut: setState2
|
|
};
|
|
T.__workletHash = 1137618554665;
|
|
T.__initData = __initData;
|
|
const animatedStyle = useAnimatedStyle(T);
|
|
if (state) {
|
|
r55 = null;
|
|
if (!state2) {
|
|
break L5;
|
|
}
|
|
}
|
|
r55 = <ReanimatedRexport.View style={animatedStyle}>
|
|
<LottieAnimationView style={styles.content} speed={stateFromStores ? 0.5 : 1} onAnimationFinish={(event) => {
|
|
if (onComplete != null) {
|
|
onComplete(event);
|
|
}
|
|
setState(true);
|
|
}} {...props2} />
|
|
</ReanimatedRexport.View>;
|
|
}
|
|
return r55;
|
|
};
|