<?php

declare(strict_types=1);

namespace App\Framework\View;

use App\Framework\Meta\MetaData;
use App\Framework\Template\TemplateContext;

final readonly class RenderContext implements TemplateContext
{
    public function __construct(
        public string $template,       // Dateiname oder Template-Key
        public MetaData $metaData,
        public array $data = [],       // Variablen wie ['title' => '...']
        public ?string $layout = null, // Optionales Layout
        public array $slots = [],       // Benannte Slots wie ['main' => '<p>...</p>']
        public ?string $controllerClass = null,
        public ?string $route = null,  // Route name for form ID generation
        public ProcessingMode $processingMode = ProcessingMode::FULL,
        public bool $isPartial = false, // Deprecated: Use processingMode instead
    ) {
    }
}
