/**
 * PDF Port
 *
 * Defines the interface for PDF generation operations.
 * This is a secondary port (output port) in hexagonal architecture.
 */

export const PDF_PORT = 'PdfPort';

export interface BookingPdfData {
  bookingNumber: string;
  bookingDate: Date;
  origin: {
    code: string;
    name: string;
  };
  destination: {
    code: string;
    name: string;
  };
  carrier: {
    name: string;
    logo?: string;
  };
  etd: Date;
  eta: Date;
  transitDays: number;
  shipper: {
    name: string;
    address: string;
    contact: string;
    email: string;
    phone: string;
  };
  consignee: {
    name: string;
    address: string;
    contact: string;
    email: string;
    phone: string;
  };
  containers: Array<{
    type: string;
    quantity: number;
    containerNumber?: string;
    sealNumber?: string;
  }>;
  cargoDescription: string;
  specialInstructions?: string;
  price: {
    amount: number;
    currency: string;
  };
}

export interface PdfPort {
  /**
   * Generate booking confirmation PDF
   */
  generateBookingConfirmation(data: BookingPdfData): Promise<Buffer>;

  /**
   * Generate rate quote comparison PDF
   */
  generateRateQuoteComparison(quotes: any[]): Promise<Buffer>;
}
