<?php

/*
 * This file is part of the VITICORE2 package.
 *
 * (c) CP Creation <web@cpcreation.fr>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

namespace CpCreation\VitiCore\Cart\LegacyOrderImport;

final readonly class LegacyOrderImportPlan
{
    /**
     * @param list<array<string, mixed>> $records
     * @param list<string>               $warnings
     * @param list<string>               $errors
     * @param array<string, int|string>  $summary
     */
    public function __construct(
        public string $sourceKey,
        public string $sourceLabel,
        public string $scope,
        public array $records,
        public array $warnings,
        public array $errors,
        public array $summary,
    ) {
    }

    public function isReady(): bool
    {
        return [] === $this->errors;
    }
}
