import { moeda } from "../format.js";
const COR = { high: "#ef4444", medium: "#f59e0b", low: "#eab308" };
const ROTULO = { high: "ALTA", medium: "MÉDIA", low: "BAIXA" };
function Detalhes({ alerta }) {
const registros = (alerta.affected_records || []).slice(0, 8);
if (!registros.length && !alerta.action_plan) return null;
return (
Ver detalhes
{registros.length > 0 && (
{registros.map((r, i) => {
const nome = r.name || r.id || "registro";
const info = r.info ? " — " + r.info : r.amount != null ? " — " + moeda(r.amount) : "";
return (
)}
{alerta.action_plan &&