import { formatValue } from '../lib/format'; export default function MapLegend({ featureLabel, range, showCancel, onCancel, mode, enumValues, }: { featureLabel: string; range: [number, number]; showCancel: boolean; onCancel: () => void; mode: 'feature' | 'density'; enumValues?: string[]; }) { const gradientStyle = mode === 'density' ? 'linear-gradient(to right, rgb(130, 234, 220), rgb(20, 140, 180), rgb(88, 28, 140))' : 'linear-gradient(to right, rgb(46, 204, 113), rgb(241, 196, 15), rgb(231, 76, 60), rgb(142, 68, 173))'; return (