import { ScanDiagnosticsModal } from "./modals/ScanDiagnosticsModal";
import { ScanSettingsModal } from "./modals/ScanSettingsModal";
import { ScanDetailsModal } from "./modals/ScanDetailsModal";
import { ScanReviewQueueModal } from "./modals/ScanReviewQueueModal";
import { ScanSummaryModal } from "./modals/ScanSummaryModal";
import type { ScanModalsSectionProps } from "./types";

export function ScanModalsSection({
  captureStatus,
  latestCapture,
  diagnosticsOpen,
  settingsOpen,
  detailsOpen,
  reviewQueueOpen,
  controller,
  setDiagnosticsOpen,
  setSettingsOpen,
  setDetailsOpen,
  setReviewQueueOpen,
  setScanSummary,
}: ScanModalsSectionProps) {
  return (
    <>
      <ScanDiagnosticsModal
        open={diagnosticsOpen}
        captureStatus={captureStatus}
        latestCapture={latestCapture}
        controller={controller}
        setDetailsOpen={setDetailsOpen}
        setDiagnosticsOpen={setDiagnosticsOpen}
      />
      <ScanSettingsModal
        open={settingsOpen}
        latestCapture={latestCapture}
        controller={controller}
        setSettingsOpen={setSettingsOpen}
      />
      <ScanDetailsModal
        open={detailsOpen}
        latestCapture={latestCapture}
        controller={controller}
        setDetailsOpen={setDetailsOpen}
      />
      <ScanReviewQueueModal
        open={reviewQueueOpen}
        controller={controller}
        setReviewQueueOpen={setReviewQueueOpen}
      />
      <ScanSummaryModal
        open={Boolean(controller.scanSummary)}
        controller={controller}
        setScanSummary={setScanSummary}
        devMode={controller.devMode}
      />
    </>
  );
}
