import {forwardRef} from 'react' import LottieView from 'lottie-react-native' import {Animated as RnAnimated} from 'react-native' import Animated from 'react-native-reanimated' import { RavenLottieViewProps, RavenLottieViewPropsWithReanimated, RavenLottieViewPropsWithoutWrapper, LottieWrapperType, } from './LottieView.interface' const AnimatedLottieView = Animated.createAnimatedComponent(LottieView) const RnAnimatedLottieView = RnAnimated.createAnimatedComponent(LottieView) export const RavenLottieView = forwardRef( ({lottieWrapperType, ...rest}, ref) => { switch (lottieWrapperType) { case LottieWrapperType.NONE: { const {progress} = rest as RavenLottieViewPropsWithoutWrapper return } case LottieWrapperType.ANIMATED: { return } case LottieWrapperType.REANIMATED: { const {animatedProps, ...otherProps} = rest as RavenLottieViewPropsWithReanimated return ( ) } default: { return <> } } }, )