<?php
declare(strict_types=1);

namespace PpPhp\Core\Platform\Event\Consumer;

final class QueueConsumerRuntime
{
    public function __construct(private readonly QueueConsumer $consumer = new QueueConsumer()) {}

    public function consumer(): QueueConsumer
    {
        return $this->consumer;
    }

    public function summary(): array
    {
        return [
            'statistics' => $this->consumer->statistics()->toArray(),
            'snapshot' => $this->consumer->snapshot()->toArray(),
        ];
    }
}
