"use client";

import type { ScanListItem, FindingDto } from "@/lib/api";
import { ScanRow } from "./scan-row";

interface ScansListProps {
  scans: ScanListItem[];
  onFindingClick?: (finding: FindingDto) => void;
}

export function ScansList({ scans, onFindingClick }: ScansListProps) {
  return (
    <div className="space-y-3">
      {scans.map((scan) => (
        <ScanRow
          key={scan.scan_id}
          scan={scan}
          onFindingClick={onFindingClick}
        />
      ))}
    </div>
  );
}
