import type { LayerExplanation } from '@/config/map-layer-definitions'; import { escapeHtml } from '@/utils/sanitize'; export function renderLayerExplanationCard(layerLabel: string, explanation: LayerExplanation): string { const list = (items: string[]): string => items.map(item => `
${escapeHtml(item)}`).join('')}${escapeHtml(explanation.purpose)}
${escapeHtml(explanation.source)}
${escapeHtml(explanation.freshness)}
${escapeHtml(explanation.confidence)}