<?php

declare(strict_types=1);

namespace App\Framework\Router\Result;

use App\Framework\Http\Status;
use App\Framework\Router\ActionResult;

final class Redirect implements ActionResult
{
    public Status $status = Status::FOUND;

    public function __construct(
        public readonly string $target,
    ) {
    }

    public static function to(string $target): self
    {
        return new self($target);
    }
}
