/**
 * FileValidationIssuesDialog — Shows validation issues for a file
 * using the same ClarificationSection component as the Clarifications tab.
 */
'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { useMemo } from 'react';
import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, } from '../../shared/dialog/index.js';
import { HiExclamationCircle } from 'react-icons/hi';
import { ClarificationSection } from '../../clarification/clarification_section.js';
export function FileValidationIssuesDialog({ open, on_open_change, file_name, items, read_only = false, on_respond, on_doc_click, on_doc_view, file_manager, }) {
    const counts = useMemo(() => {
        const c = { pending: 0, responded: 0, resolved: 0, dismissed: 0, total: 0 };
        for (const item of items) {
            c[item.status]++;
            c.total++;
        }
        return c;
    }, [items]);
    return (_jsx(Dialog, { open: open, onOpenChange: on_open_change, children: _jsxs(DialogContent, { className: "max-w-3xl max-h-[80vh] overflow-y-auto", children: [_jsxs(DialogHeader, { children: [_jsxs(DialogTitle, { className: "flex items-center gap-2", children: [_jsx(HiExclamationCircle, { className: "h-5 w-5 text-red-500 flex-shrink-0" }), "Validation Issues"] }), _jsxs(DialogDescription, { className: "sr-only", children: [items.length, " validation issue", items.length !== 1 ? 's' : ''] })] }), _jsx("div", { className: "mt-2", children: _jsx(ClarificationSection, { items: items, counts: counts, callbacks: {}, hide_submit: true, hide_header: true, on_response_change: on_respond, on_doc_click: on_doc_click, on_doc_view: on_doc_view, file_manager: file_manager, read_only: read_only }) })] }) }));
}
//# sourceMappingURL=file_validation_issues_dialog.js.map