import Text from '@/components/Text';
import Styles from '@/constants/Styles';
import { useTheme } from '@/providers/ThemeProvider';
import { ActivityIndicator, View } from 'react-native';

type Props = {
   size?: 'small' | 'large'
}

export default function LoadingCenter({ size = 'large' }: Props) {
   const { colors } = useTheme();

   return (
      <View style={[Styles.loadingCenter]}>
         <View style={[Styles.loadingBox, Styles.shadowBox, { backgroundColor: colors.modalBackground }]}>
            <ActivityIndicator size={size} color={colors.dimmed} />
            <Text style={{ color: colors.dimmed }}>Loading</Text>
         </View>
      </View>
   )
}
