<?php
declare(strict_types=1);

namespace PpPhp\Core\Platform\Event\Dispatcher;

final class DispatcherRuntime
{
    public function __construct(private readonly DelayedDispatcher $dispatcher = new DelayedDispatcher()) {}

    public function dispatcher(): DelayedDispatcher
    {
        return $this->dispatcher;
    }

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