import * as React from "react"; import { ActivityIndicator, ActivityIndicatorProps } from "react-native"; import { useTheme } from "@applicaster/zapp-react-native-utils/theme"; import { isAndroidTVPlatform } from "@applicaster/zapp-react-native-utils/reactUtils"; type ActivityIndicatorThemeValues = { loading_spinner_size: ActivityIndicatorProps["size"]; loading_spinner_color: ActivityIndicatorProps["color"]; }; type Props = ActivityIndicatorProps & { showAnyway?: boolean }; export function SpinnerComponent(props: Props) { const { loading_spinner_size, loading_spinner_color } = useTheme() as ActivityIndicatorThemeValues; const { showAnyway = false } = props; if (isAndroidTVPlatform() && !showAnyway) { return null; } return ( ); }