/** * PlanDiffBadge — The +/- change badge * * Sits in the repo info area of the document card (top-left). * Shows addition/deletion counts and toggles plan diff view when clicked. */ import React from "react"; import type { PlanDiffStats } from "../../utils/planDiffEngine"; interface PlanDiffBadgeProps { stats: PlanDiffStats | null; isActive: boolean; onToggle: () => void; hasPreviousVersion: boolean; } export const PlanDiffBadge: React.FC = ({ stats, isActive, onToggle, hasPreviousVersion, }) => { if (!hasPreviousVersion || !stats) return null; const hasChanges = stats.additions > 0 || stats.deletions > 0 || stats.modifications > 0; if (!hasChanges) return null; return ( ); };