<?php
declare(strict_types=1);

namespace PpPhp\Core\Designer\Component;

final class DesignerRendererMap
{
    private array $map = [];

    public function register(string $componentType, string $renderer): void
    {
        $this->map[$componentType] = $renderer;
    }

    public function rendererFor(string $componentType): string
    {
        return $this->map[$componentType] ?? $componentType;
    }

    public function all(): array { return $this->map; }
}
