package de.gecheckt.pdf.umbenenner.domain.model;

import java.util.Objects;

/**
 * Represents a document that passed all pre-checks.
 * <p>
 * This result encapsulates:
 * <ul>
 *   <li>The original document candidate metadata</li>
 *   <li>The successful PDF text extraction result</li>
 * </ul>
 * <p>
 * A document with this decision is ready to proceed to further processing steps
 * (fingerprinting, persistence, KI integration, filename generation, target copy).
 *
 * @param candidate the source document metadata
 * @param extraction the successful text extraction result
 */
public record PreCheckPassed(
    SourceDocumentCandidate candidate,
    PdfExtractionSuccess extraction
) implements ProcessingDecision, DocumentProcessingOutcome {
    /**
     * Constructor with validation.
     *
     * @param candidate must be non-null
     * @param extraction must be non-null
     * @throws NullPointerException if either parameter is null
     */
    public PreCheckPassed {
        Objects.requireNonNull(candidate, "candidate must not be null");
        Objects.requireNonNull(extraction, "extraction must not be null");
    }
}