import { StyleSheet } from 'react-native' import "maplibre-gl/dist/maplibre-gl.css" import { useBackgroundPermissions } from 'expo-location' import Map from '@/components/Map' import { FAB, Surface, Text } from 'react-native-paper' import { useGame } from '@/hooks/useGame' import { FontAwesome6 } from '@expo/vector-icons' import FreeChaseBanner from '@/components/FreeChaseBanner' import { View } from 'react-native' export default function MapScreen() { const [backgroundStatus, requestBackgroundPermission] = useBackgroundPermissions() if (!backgroundStatus?.granted && backgroundStatus?.canAskAgain) requestBackgroundPermission() const game = useGame() return ( {backgroundStatus?.granted ? : La géolocalisation est requise pour utiliser la carte.} 0} icon={(props) => } color='black' label={`${game.money}`} onPress={() => {}} /> 0} size='small' color='black' icon={game.currentRunner ? 'run-fast' : () => } label={game.currentRunner ? "Coureuse" : "Poursuiveuse"} onPress={() => {}} /> ) } const styles = StyleSheet.create({ page: { flex: 1, }, container: { flexGrow: 1, alignItems: 'center', justifyContent: 'center', }, map: { flex: 1, alignSelf: 'stretch', }, moneyBadge: { position: 'absolute', top: 40, right: 20, backgroundColor: 'orange', }, statusBadge: { position: 'absolute', top: 40, left: 20, backgroundColor: 'pink', }, })