<?php

namespace Planaday\Html\NodeTags;

use DOMElement;
use DOMNode;
use Planaday\Html\Nodes\NodeCouldNotBeCreatedException;
use Planaday\Html\Nodes\NodeData;
use Planaday\Html\Nodes\ParserNode;

interface Tag {
	public function setOriginalNode( DOMElement&ParserNode $node): void;
	public function setAttribute(string $key, mixed $value): void;
	public function setNodeData(NodeData $nodeData): void;

	/**
	 * @return DOMNode&ParserNode
	 * @throws TagNotFullyInitializedException
	 * @throws NodeCouldNotBeCreatedException
	 */
	public function getNewNode(): DOMNode&ParserNode;

	/**
	 * @return array<string, mixed>
	 */
	public function getConfig(): array;

	public function getTagTitle(): ?string;

	public function getTagDir(): string;
	public function getCurrentTemplateName(): string;
	public function destroy(): void;
}