<?php

declare(strict_types=1);

namespace App\Framework\Core\Events;

use App\Framework\Core\ValueObjects\Timestamp;
use App\Framework\Http\Request;
use App\Framework\Http\Response;

final readonly class BeforeEmitResponse
{
    public readonly Timestamp $timestamp;

    public function __construct(
        public Request $request,
        public Response $response,
        ?Timestamp $timestamp = null,
        public array $context = []
    ) {
        $this->timestamp = $timestamp ?? Timestamp::now();
    }
}
