'use client'; import { FUEL_TYPE_COLORS } from './power-plant-marker.js'; interface MapLegendProps { showPowerPlants?: boolean; } const FUEL_TYPE_DISPLAY_ORDER = [ 'Natural Gas', 'Coal', 'Nuclear', 'Hydroelectric', 'Wind', 'Solar', 'Petroleum', 'Biomass', 'Geothermal', ]; export function MapLegend({ showPowerPlants = false }: MapLegendProps) { return (
{/* Price heatmap gradient */}
Price Heatmap
$0 $50 $100+
$/MWh
{/* Marker size scale */}
Datacenter Size
50
200
500+
MW
{/* Pulsing icon */}
Price spike
{/* Grid stress glow icon */}
Grid stress >85%
{/* Power plant fuel type legend */} {showPowerPlants && (
Power Plants
{FUEL_TYPE_DISPLAY_ORDER.map(fuel => (
{fuel}
))}
)}
); }