<?php

namespace Planaday\Html\Parsers\TagNameParsers;

use Planaday\Html\NodeTags\Tag;
use Planaday\Utility\DependencyInjection\Attributes\DefaultImplementation;

#[DefaultImplementation( PadTagNameParser::class )]
interface TagNameParser {
	/**
	 * @param string $tagName
	 * @param array<string, class-string<Tag>> $tagRegistry
	 *
	 * @return class-string<Tag>|null
	 */
	public function parseTagName(string $tagName, array $tagRegistry): string|null;

	/**
	 * @param array<string, class-string<Tag>> $tagRegistry
	 *
	 * @return void
	 */
	public function setBaseRegistry(array $tagRegistry): void;
}