using Codecrete.SwissQRBill.Generator;
namespace DocumentService.Application.Common.Interfaces;
///
/// Interface for Swiss QR Code processing operations.
/// Extracts and parses Swiss QR Codes from PDF documents.
///
public interface ISwissQrCodeProcessor
{
///
/// Extracts and parses Swiss QR Code from a PDF document.
/// Returns both parsed Bill object and raw QR text lines.
///
///
/// PDF document stream. Must be readable and positioned at the beginning (Position = 0).
/// Non-seekable streams are supported. Caller is responsible for disposal.
///
/// Optional: Specific page numbers to scan (1-indexed). If null, scans all pages starting with last page.
/// Cancellation token
/// Tuple: (Parsed Codecrete Bill, Raw QR lines as string array)
///
/// Thrown when no Swiss QR Code is found in the specified pages
///
///
/// Thrown when stream is empty or (for seekable streams) not positioned at the beginning
///
Task<(Bill Bill, string[] RawLines)> ExtractSwissQrCodeAsync(
Stream pdfStream,
int[]? pageNumbers = null,
CancellationToken cancellationToken = default);
}