'use client';
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { FileCode2, AlertTriangle } from 'lucide-react';
import { cn } from '../../../lib/utils.js';
export function ReviewCommentCard({ comment, className }) {
    const lineDisplay = comment.startLine !== undefined ? `L${comment.startLine}-${comment.line}` : `L${comment.line}`;
    return (_jsxs("div", { className: cn('bg-card text-card-foreground rounded-lg border', !comment.inDiffRange && 'border-amber-300 dark:border-amber-700', className), children: [_jsxs("div", { className: "flex items-center gap-2 border-b px-3 py-2 text-xs", children: [_jsx(FileCode2, { className: "text-muted-foreground h-3.5 w-3.5 shrink-0" }), _jsx("span", { className: "text-muted-foreground min-w-0 truncate font-mono", children: comment.path }), _jsx("span", { className: "bg-muted text-muted-foreground shrink-0 rounded px-1.5 py-0.5 font-mono", children: lineDisplay }), !comment.inDiffRange && (_jsxs("span", { className: "ml-auto flex shrink-0 items-center gap-1 text-amber-600 dark:text-amber-400", children: [_jsx(AlertTriangle, { className: "h-3 w-3" }), "Outside diff"] }))] }), _jsx("div", { className: "px-3 py-2 text-sm", children: comment.body }), comment.suggestion ? (_jsxs("div", { className: "border-t px-3 py-2", children: [_jsx("p", { className: "text-muted-foreground mb-1 text-xs font-medium", children: "Suggestion:" }), _jsx("pre", { className: "overflow-x-auto rounded-md bg-emerald-50 p-2 font-mono text-xs text-emerald-900 dark:bg-emerald-950/30 dark:text-emerald-300", children: comment.suggestion })] })) : null] }));
}
