import { Button, Input, Space, Typography } from "antd"; import { useState } from "react"; const { Text } = Typography; const { TextArea } = Input; interface MapFallbackProps { onLocationSelect?: (lat: number, lng: number, address: string) => void; height?: string; initialAddress?: string; } export function MapFallback({ onLocationSelect, height = "100%", initialAddress = "" }: MapFallbackProps) { const [address, setAddress] = useState(initialAddress); // Prevent events from bubbling up to parent components const handleTouchStart = (e: React.TouchEvent) => { e.stopPropagation(); }; const handleTouchMove = (e: React.TouchEvent) => { e.stopPropagation(); }; const handleTouchEnd = (e: React.TouchEvent) => { e.stopPropagation(); }; const handleMouseDown = (e: React.MouseEvent) => { e.stopPropagation(); }; const handleMouseMove = (e: React.MouseEvent) => { e.stopPropagation(); }; const handleMouseUp = (e: React.MouseEvent) => { e.stopPropagation(); }; const handleWheel = (e: React.WheelEvent) => { e.stopPropagation(); }; const handleSubmit = () => { if (address.trim()) { // For fallback, we'll use dummy coordinates // In a real implementation, you might want to use a geocoding service const dummyLat = 24.7136 + (Math.random() - 0.5) * 0.01; const dummyLng = 46.6753 + (Math.random() - 0.5) * 0.01; onLocationSelect?.(dummyLat, dummyLng, address); } }; return (
📍
Map Not Available
Please enter your address manually
Enter Address: