<?php

declare(strict_types=1);

final class MyronSectionContentMigrationReport
{
    /**
     * @param list<array<string, mixed>> $mapped
     * @param list<array<string, mixed>> $unmatchedSource
     * @param list<array<string, mixed>> $unmatchedDestination
     */
    public function __construct(
        private readonly string $context,
        private readonly array $mapped,
        private readonly array $unmatchedSource,
        private readonly array $unmatchedDestination,
    ) {
    }

    /**
     * @return array<string, mixed>
     */
    public function toArray(): array
    {
        return [
            'context' => $this->context,
            'mapped' => $this->mapped,
            'unmatchedSource' => $this->unmatchedSource,
            'unmatchedDestination' => $this->unmatchedDestination,
            'isOneToOne' => $this->unmatchedSource === [] && $this->unmatchedDestination === [],
        ];
    }
}
