import React from 'react';
import type { ReportData } from '../types';
import { ReportDisplay } from './ReportDisplay';

interface PrintableReportProps {
  report: ReportData;
}

export const PrintableReport: React.FC<PrintableReportProps> = ({ report }) => {
  // To ensure the generated PDF is strictly in light mode, we can wrap it in a container 
  // that forces light theme classes, but since html2canvas evaluates computed styles, 
  // it's best to ensure it renders offscreen without "dark" class in its hierarchy.
  // The 'light' class can help if tailwind 'dark' strategy is class-based.
  return (
    <div 
      id="printable-report-container" 
      data-report={JSON.stringify(report)}
      className="light bg-white text-slate-900"
      style={{ width: '210mm', minHeight: '297mm', background: 'white' }}
    >
      <ReportDisplay report={report} />
    </div>
  );
};