/**
 * ResolutionStatusStrip — compact pass/fail banner for an aggregate resolver
 * (sum_match, etc.). Renders below the response file list so client and agent
 * see the same verdict.
 */
'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { IoCheckmarkCircle, IoAlertCircle } from 'react-icons/io5';
import { cn } from '../../utils/cn.js';
export function ResolutionStatusStrip({ check, file_names, read_only, loading, className, }) {
    const passed = check.passed;
    const Icon = passed ? IoCheckmarkCircle : IoAlertCircle;
    const tone = passed
        ? 'border-emerald-200 bg-emerald-50 text-emerald-900 dark:border-emerald-900/40 dark:bg-emerald-950/30 dark:text-emerald-200'
        : 'border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-900/40 dark:bg-amber-950/30 dark:text-amber-200';
    const icon_color = passed ? 'text-emerald-600' : 'text-amber-600';
    const file_note_entries = Object.entries(check.file_notes ?? {});
    return (_jsx("div", { className: cn('cls_resolution_status_strip rounded-md border px-3 py-2 text-sm', tone, className), "data-passed": passed, children: _jsxs("div", { className: "flex items-start gap-2", children: [loading ? (_jsxs("svg", { className: "h-4 w-4 mt-0.5 animate-spin", xmlns: "http://www.w3.org/2000/svg", fill: "none", viewBox: "0 0 24 24", children: [_jsx("circle", { className: "opacity-25", cx: "12", cy: "12", r: "10", stroke: "currentColor", strokeWidth: "4" }), _jsx("path", { className: "opacity-75", fill: "currentColor", d: "M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z" })] })) : (_jsx(Icon, { className: cn('h-4 w-4 mt-0.5 flex-shrink-0', icon_color) })), _jsxs("div", { className: "flex-1 min-w-0", children: [_jsx("p", { className: "font-medium leading-snug", children: check.summary }), file_note_entries.length > 0 && (_jsx("ul", { className: "mt-1.5 space-y-0.5 text-xs", children: file_note_entries.map(([file_id, note]) => (_jsxs("li", { className: "flex gap-1.5", children: [_jsxs("span", { className: "font-medium opacity-80", children: [file_names?.[file_id] ?? file_id, ":"] }), _jsx("span", { className: "opacity-90", children: note })] }, file_id))) }))] })] }) }));
}
//# sourceMappingURL=resolution_status_strip.js.map