"use client";
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { memo } from "react";
import { cn } from "@stigmer/theme";
/**
 * Compact summary bar showing colored count badges for added, removed,
 * and modified nodes. Rendered at the top of the diff graph canvas.
 */
export const DiffSummaryBar = memo(function DiffSummaryBar({ diff, className, }) {
    const { added, removed, modified } = diff.summary;
    if (added === 0 && removed === 0 && modified === 0) {
        return (_jsx("div", { className: cn("flex items-center gap-2 rounded-md border border-[var(--stgm-border,#e5e5e5)] bg-[var(--stgm-card,var(--stgm-background,#fff))] px-3 py-1.5 text-xs text-[var(--stgm-muted-foreground,#737373)] shadow-sm", className), children: "No changes detected" }));
    }
    return (_jsxs("div", { className: cn("flex items-center gap-3 rounded-md border border-[var(--stgm-border,#e5e5e5)] bg-[var(--stgm-card,var(--stgm-background,#fff))] px-3 py-1.5 text-xs font-medium shadow-sm", className), role: "status", "aria-label": `Diff summary: ${added} added, ${removed} removed, ${modified} modified`, children: [added > 0 && (_jsxs("span", { className: "flex items-center gap-1 text-[var(--stgm-success,#22c55e)]", children: [_jsx("span", { "aria-hidden": "true", children: "+" }), added, " added"] })), removed > 0 && (_jsxs("span", { className: "flex items-center gap-1 text-[var(--stgm-destructive,#ef4444)]", children: [_jsx("span", { "aria-hidden": "true", children: "\u2212" }), removed, " removed"] })), modified > 0 && (_jsxs("span", { className: "flex items-center gap-1 text-[var(--stgm-warning,#f59e0b)]", children: [_jsx("span", { "aria-hidden": "true", children: "~" }), modified, " modified"] }))] }));
});
//# sourceMappingURL=DiffSummaryBar.js.map