| 1 | 'use client'; |
| 2 | |
| 3 | import { motion } from 'framer-motion'; |
| 4 | import { Globe, MapPin } from 'lucide-react'; |
| 5 | |
| 6 | interface ViewPresetsProps { |
| 7 | onNavigate: (lat: number, lng: number, zoom: number) => void; |
| 8 | } |
| 9 | |
| 10 | const PRESETS = [ |
| 11 | { label: 'GLOBAL', lat: 20, lng: 0, zoom: 2.5, icon: '馃實' }, |
| 12 | { label: 'EUROPE', lat: 48, lng: 10, zoom: 4, icon: '馃嚜馃嚭' }, |
| 13 | { label: 'MIDDLE EAST', lat: 30, lng: 45, zoom: 4.5, icon: '馃敟', hot: true }, |
| 14 | { label: 'EAST ASIA', lat: 35, lng: 120, zoom: 4, icon: '馃審' }, |
| 15 | { label: 'AMERICAS', lat: 25, lng: -90, zoom: 3, icon: '馃寧' }, |
| 16 | { label: 'UKRAINE', lat: 49, lng: 32, zoom: 6, icon: '鈿旓笍', hot: true }, |
| 17 | { label: 'AFRICA', lat: 5, lng: 20, zoom: 3.5, icon: '馃實' }, |
| 18 | { label: 'S.E. ASIA', lat: 10, lng: 110, zoom: 4.5, icon: '馃審' }, |
| 19 | { label: 'ARCTIC', lat: 75, lng: 0, zoom: 3.5, icon: '鉂勶笍' }, |
| 20 | { label: 'INDIA', lat: 22, lng: 78, zoom: 4.5, icon: '馃嚠馃嚦' }, |
| 21 | { label: 'AUSTRALIA', lat: -25, lng: 134, zoom: 4, icon: '馃嚘馃嚭' }, |
| 22 | { label: 'SUDAN', lat: 15, lng: 30, zoom: 5.5, icon: '鈿狅笍', hot: true }, |
| 23 | ]; |
| 24 | |
| 25 | export default function ViewPresets({ onNavigate }: ViewPresetsProps) { |
| 26 | return ( |
| 27 | <motion.div |
| 28 | initial={{ opacity: 0, x: -20 }} |
| 29 | animate={{ opacity: 1, x: 0 }} |
| 30 | transition={{ delay: 0.7, duration: 0.6 }} |
| 31 | className="glass-panel p-2.5 pointer-events-auto" |
| 32 | > |
| 33 | <div className="flex items-center gap-2 mb-2"> |
| 34 | <Globe className="w-3.5 h-3.5 text-[var(--gold-primary)]" /> |
| 35 | <span className="hud-text text-[12px] text-[var(--text-primary)] tracking-widest">REGION PRESETS</span> |
| 36 | <span className="gotham-tag gotham-tag--critical" style={{ fontSize: '7px', padding: '1px 4px', marginLeft: 'auto' }}> |
| 37 | {PRESETS.filter(p => (p as any).hot).length} HOT |
| 38 | </span> |
| 39 | </div> |
| 40 | <div className="grid grid-cols-2 gap-1"> |
| 41 | {PRESETS.map(p => ( |
| 42 | <button |
| 43 | key={p.label} |
| 44 | onClick={() => onNavigate(p.lat, p.lng, p.zoom)} |
| 45 | className={`flex items-center gap-1.5 px-2 py-1.5 rounded text-[10px] font-mono tracking-wider border border-transparent hover:border-[var(--border-primary)] hover:text-[var(--gold-primary)] transition-all hover:scale-[1.02] active:scale-[0.98] ${(p as any).hot ? 'text-[var(--alert-red)] hover:border-[var(--alert-red)]/30 hover:bg-[var(--alert-red)]/5' : 'text-[var(--text-muted)] hover:bg-[var(--hover-accent)]'}`} |
| 46 | > |
| 47 | <span className="text-[11px] flex-shrink-0">{p.icon}</span> |
| 48 | <span>{p.label}</span> |
| 49 | {(p as any).hot && <span className="w-1.5 h-1.5 rounded-full bg-[var(--alert-red)] animate-osiris-pulse ml-auto flex-shrink-0" />} |
| 50 | </button> |
| 51 | ))} |
| 52 | </div> |
| 53 | </motion.div> |
| 54 | ); |
| 55 | } |