import { RSRP_LEGEND } from '@/constants/rsrp-thresholds.ts'; import { useCoverageStore } from '@/store/coverage.ts'; import { useSitesStore } from '@/store/sites.ts'; export default function Legend() { const result = useCoverageStore((s) => s.result); const heatmapVisible = useCoverageStore((s) => s.heatmapVisible); const toggleHeatmap = useCoverageStore((s) => s.toggleHeatmap); const settings = useCoverageStore((s) => s.settings); const sites = useSitesStore((s) => s.sites); if (!result) return null; // Estimate coverage area: total points * resolution^2 const areaKm2 = (result.totalPoints * settings.resolution * settings.resolution) / 1e6; return (