<?php

namespace MintyPHP\Service\Audit;

/**
 * Core-side contract for recording import audit events.
 *
 * Implemented by the audit module's ImportAuditService when active.
 * Falls back to NullImportAudit (no-op) when the audit module is disabled.
 */
interface ImportAuditInterface
{
    /**
     * @param array<int, string> $mappedTargets
     */
    public function startRun(
        string $profileKey,
        array $mappedTargets,
        ?string $sourceFilename,
        int $userId,
        ?int $currentTenantId
    ): ?int;

    /**
     * @param array<string, mixed> $result
     */
    public function finishRun(?int $runId, array $result, ?string $forcedStatus = null): void;
}
