/**
 * Sales Return Reference Data Port
 * Interface for lookup data (customers, materials, etc)
 */

export interface SalesReturnReferenceDataPort {
  /**
   * Get customer name and info
   */
  getCustomer(customerId: string): Promise<{
    id: string;
    name: string;
    email?: string;
    phone?: string;
  } | null>;

  /**
   * Get material/product information
   */
  getMaterial(materialId: string): Promise<{
    id: string;
    name: string;
    price: number;
    unit: string;
  } | null>;

  /**
   * Get original invoice for return validation
   */
  getInvoice(invoiceId: string): Promise<{
    id: string;
    invoiceNumber: string;
    date: string;
    customerId: string;
    items: Array<{
      materialId: string;
      name: string;
      quantity: number;
      unitPrice: number;
      warehouseId?: string;
      shelfId?: string;
    }>;
    totals: {
      subTotal: number;
      taxAmount: number;
      grandTotal: number;
    };
  } | null>;
}
