using DocumentOperator.Domain.ValueObjects;

namespace DocumentOperator.Application.Common.Interfaces;

/// <summary>
/// Interface for Swiss QR Code processing operations.
/// Extracts and parses Swiss QR Codes from PDF documents.
/// </summary>
public interface ISwissQrCodeProcessor
{
    /// <summary>
    /// Extracts and parses Swiss QR Code from the last page of a PDF document.
    /// </summary>
    /// <param name="pdfBytes">PDF document as byte array</param>
    /// <param name="cancellationToken">Cancellation token</param>
    /// <returns>Parsed Swiss QR Code data</returns>
    /// <exception cref="Domain.Exceptions.SwissQrCodeNotFoundException">
    /// Thrown when no Swiss QR Code is found on the last page
    /// </exception>
    /// <exception cref="Domain.Exceptions.PdfProcessingException">
    /// Thrown when PDF processing fails
    /// </exception>
    Task<SwissQrCodeData> ExtractSwissQrCodeAsync(byte[] pdfBytes, CancellationToken cancellationToken = default);
}
