'use client';

import * as React from 'react';
import { Document as PDFDocument } from '@react-pdf/renderer';
import { EstimationPDF } from './EstimationPDF';
import { AgbsPDF } from './AgbsPDF';

interface CombinedProps {
    estimationProps: any;
    showAgbs?: boolean;
    techDetails?: any[];
    principles?: any[];
}

export const CombinedQuotePDF = ({ estimationProps, showAgbs = true, techDetails, principles, mode = 'full' }: CombinedProps & { mode?: 'estimation' | 'full' }) => {
    return (
        <PDFDocument title={`Mintel - ${estimationProps.state.companyName || estimationProps.state.name}`}>
            <EstimationPDF {...estimationProps} mode={mode} techDetails={techDetails} principles={principles} />
            {showAgbs && (
                <AgbsPDF mode={mode} state={estimationProps.state} headerIcon={estimationProps.headerIcon} footerLogo={estimationProps.footerLogo} />
            )}
        </PDFDocument>
    );
};
