<?php

declare(strict_types=1);

namespace App\Business\DataImport;

use App\Business\DataImport\Enums\DataImportRowStatus;

final readonly class DataImportRowPrecheckOutcome
{
    /**
     * @param  list<string>  $errorMessages
     * @param  array<string, string|null>  $rawSnapshot
     */
    public function __construct(
        public int $rowNumber,
        public DataImportRowStatus $status,
        public array $rawSnapshot,
        public array $errorMessages = [],
    ) {}

    public function passed(): bool
    {
        return $this->status === DataImportRowStatus::Validated;
    }
}
