<?php

declare(strict_types=1);

namespace App\Business\DataImport;

use App\Business\DataImport\Enums\DataImportRowStatus;

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

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