import Box from "@components/bases/Box";
import { ActivityIndicator, Text } from "react-native";

interface Props {
	message?: string;
}

const LoadingModal = ({ message = "Veuillez patienter..." }: Props) => {
	return (
		<Box
			width={300}
			height={200}
			backgroundColor={"white"}
			alignItems={"center"}
			justifyContent={"center"}
			alignSelf={"center"}
			marginTop={"x240"}
			position={"absolute"}
			zIndex={10}
			borderRadius={20}
			gap={"m"}
			shadowColor={"black"}
			shadowOffset={{ width: 0, height: 0 }}
			shadowOpacity={0.5}
		>
			<ActivityIndicator size={"large"} />
			<Text>{message}</Text>
		</Box>
	);
};

export default LoadingModal;
