import { View, ActivityIndicator } from "react-native";
import { useTheme } from "../theme";

interface LoadingProps {
  fullScreen?: boolean;
}

export function Loading({ fullScreen = false }: LoadingProps) {
  const theme = useTheme();

  return (
    <View style={[{ alignItems: "center", justifyContent: "center" }, fullScreen && { flex: 1 }]}>
      <ActivityIndicator size="large" color={theme.colors.primary} />
    </View>
  );
}