import React from 'react'; import { View, Text } from 'react-native'; import MapView, { Marker, Polyline, PROVIDER_DEFAULT } from 'react-native-maps'; import { useAppTheme } from '@theme'; import { Coordinates } from '@app-types/index'; import { getStyles } from './mapView.styles'; interface MapViewComponentProps { origin?: Coordinates; destination?: Coordinates; currentLocation?: Coordinates; showRoute?: boolean; style?: any; } export const MapViewComponent: React.FC = ({ origin, destination, currentLocation, showRoute = false, style, }) => { const { colors } = useAppTheme(); const styles = getStyles(colors); const defaultRegion = { latitude: currentLocation?.latitude || origin?.latitude || 12.9716, longitude: currentLocation?.longitude || origin?.longitude || 77.5946, latitudeDelta: 0.05, longitudeDelta: 0.05, }; return ( {currentLocation && ( )} {origin && ( )} {destination && ( )} {showRoute && origin && destination && ( )} 📍 Live Navigation Map Active ); }; export default MapViewComponent;