<?php

declare(strict_types=1);

final class MyronSiteSnapshotValidationResult
{
    /**
     * @param array<string, int> $entityCounts
     * @param list<string> $warnings
     */
    public function __construct(
        public readonly bool $valid,
        public readonly array $entityCounts,
        public readonly array $warnings,
        public readonly string $message,
    ) {
    }

    /**
     * @return array<string, mixed>
     */
    public function toArray(): array
    {
        return [
            'valid' => $this->valid,
            'entityCounts' => $this->entityCounts,
            'warnings' => $this->warnings,
            'message' => $this->message,
        ];
    }
}

