<?php

declare(strict_types=1);

namespace App\Domain\Reputation;

use DateTimeImmutable;

/**
 * The full result of evaluating a policy against the current data set.
 * Wraps the entry list with metadata used by the distribution endpoint
 * (count, generation timestamp, policy name).
 */
final class Blocklist
{
    /**
     * @param list<BlocklistEntry> $entries
     */
    public function __construct(
        public readonly array $entries,
        public readonly string $policyName,
        public readonly DateTimeImmutable $generatedAt,
    ) {
    }

    public function count(): int
    {
        return count($this->entries);
    }
}
