// engine/dashboard/drift-badge.ts — Drift score badge HTML fragment (SPEC-748)
// Renders a coloured chip: green ≤ 5%, amber ≤ 15%, red > 15%.
import { getDriftBadgeColour } from './drift-score.js';
// CSS colour mapping — referenced in badge class names
const COLOUR_CSS = {
    green: '#22c55e',
    amber: '#f59e0b',
    red: '#ef4444',
};
/**
 * Render an HTML badge fragment displaying the drift score.
 *
 * @example
 * renderDriftBadge(10.0)
 * // '<span class="drift-badge drift-amber" style="...">Drift: 10.0%</span>'
 */
export function renderDriftBadge(score) {
    const colour = getDriftBadgeColour(score);
    const bgColour = COLOUR_CSS[colour];
    const displayScore = score.toFixed(1);
    return `<span class="drift-badge drift-${colour}" style="display:inline-block;padding:2px 10px;border-radius:12px;background:${bgColour};color:#fff;font-size:0.8rem;font-weight:600;">Drift: ${displayScore}%</span>`;
}
//# sourceMappingURL=drift-badge.js.map