/**
 * FileBarValidation — 4-state validation badge for file bars.
 * States: passed (green tick), issues (red badge), resolved (amber badge), validating (spinner).
 */
'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { HiCheckCircle, HiExclamationCircle } from 'react-icons/hi';
export function FileBarValidation({ state, issue_count = 0, on_click }) {
    if (state === 'validating') {
        return (_jsxs("svg", { className: "h-3 w-3 text-blue-500 animate-spin flex-shrink-0", 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" })] }));
    }
    if (state === 'passed') {
        return on_click ? (_jsx("button", { type: "button", onClick: on_click, className: "inline-flex items-center flex-shrink-0 cursor-pointer hover:opacity-70 transition-opacity", title: "Validation passed \u2014 click for details", children: _jsx(HiCheckCircle, { className: "h-3.5 w-3.5 text-green-500" }) })) : (_jsx(HiCheckCircle, { className: "h-3.5 w-3.5 text-green-500 flex-shrink-0", title: "Validation passed" }));
    }
    if (state === 'accepted') {
        return on_click ? (_jsxs("button", { type: "button", onClick: on_click, className: "inline-flex items-center flex-shrink-0 cursor-pointer hover:opacity-70 transition-opacity", title: "Accepted by agent \u2014 click for details", children: [_jsx(HiCheckCircle, { className: "h-3.5 w-3.5 text-green-500" }), _jsx(HiCheckCircle, { className: "h-3.5 w-3.5 text-green-500 -ml-1.5" })] })) : (_jsxs("span", { className: "inline-flex items-center flex-shrink-0", title: "Accepted by agent", children: [_jsx(HiCheckCircle, { className: "h-3.5 w-3.5 text-green-500" }), _jsx(HiCheckCircle, { className: "h-3.5 w-3.5 text-green-500 -ml-1.5" })] }));
    }
    if (state === 'sent_back') {
        return (_jsxs("button", { type: "button", onClick: on_click, className: "inline-flex items-center gap-0.5 px-1 py-px rounded text-[9px] font-medium cursor-pointer transition-colors flex-shrink-0 text-blue-600 bg-blue-50 hover:bg-blue-100", title: "Click to view \u2014 sent back to client", children: [_jsx(HiCheckCircle, { className: "h-2.5 w-2.5" }), "Sent Back"] }));
    }
    if (state === 'pending_review') {
        return (_jsxs("button", { type: "button", onClick: on_click, className: "inline-flex items-center gap-0.5 px-1 py-px rounded text-[9px] font-medium cursor-pointer transition-colors flex-shrink-0 text-amber-600 bg-amber-50 hover:bg-amber-100", title: "Awaiting agent review \u2014 click to review", children: [_jsx(HiExclamationCircle, { className: "h-2.5 w-2.5" }), "Pending Review"] }));
    }
    if (state === 'resolved') {
        return (_jsxs("button", { type: "button", onClick: on_click, className: "inline-flex items-center gap-0.5 px-1 py-px rounded text-[9px] font-medium cursor-pointer transition-colors flex-shrink-0 text-amber-600 bg-amber-50 hover:bg-amber-100", title: "Click to view resolved issues", children: [_jsx(HiCheckCircle, { className: "h-2.5 w-2.5" }), issue_count, " Resolved"] }));
    }
    // state === 'issues'
    return (_jsxs("button", { type: "button", onClick: on_click, className: "inline-flex items-center gap-0.5 px-1 py-px rounded text-[9px] font-medium cursor-pointer transition-colors flex-shrink-0 text-red-600 bg-red-50 hover:bg-red-100", title: "Click to view and respond to validation issues", children: [_jsx(HiExclamationCircle, { className: "h-2.5 w-2.5" }), issue_count, " issue", issue_count !== 1 ? 's' : ''] }));
}
//# sourceMappingURL=file_bar_validation.js.map