import React from 'react'; import { View, StyleSheet, ActivityIndicator } from 'react-native'; interface LogoLoaderProps { // Pass a require('...') or an imported JSON source?: any; loop?: boolean; autoPlay?: boolean; size?: number; // square size in px } const LogoLoader: React.FC = ({ source, loop = true, autoPlay = true, size = 160, }) => { // If Lottie is not available or source not provided, use ActivityIndicator if (!source) { return ( ); } // Dynamically import LottieView only if needed let LottieView: any; try { LottieView = require('lottie-react-native').default; } catch (e) { // Fallback to ActivityIndicator if Lottie is not available return ( ); } return ( ); }; const styles = StyleSheet.create({ container: { flex: 1, justifyContent: 'center', alignItems: 'center', }, }); export default LogoLoader;