// Utility router component directing the print viewport window to specific templates (invoice, advance, deposit).
import React from 'react';
import { useParams } from 'react-router-dom';
import AdvanceReceipt from './AdvanceReceipt'; // Removed "/components"
import FullInvoice from './Invoice';           // Path fixed to match your "Invoice.jsx" filename
import DepositReceipt from './deposit';
const PrintTemplate = () => {
  const { type, id } = useParams();

  switch (type) {
    case 'receipt':
      return <AdvanceReceipt />;
    case 'invoice':
      return <FullInvoice />;
    case 'deposit':
      return <DepositReceipt />;
    default:
      return (
        <div style={{ padding: "50px", textAlign: "center", color: "black" }}>
          <h2>Invalid Print Type</h2>
          <p>Type: {type} | ID: {id}</p>
        </div>
      );
  }
};

export default PrintTemplate;