<?php

namespace Planaday\Html\Tags\Form\GenericInput\HiddenInput;

use Planaday\Html\Tags\Form\SelectableDataInputFieldTag;
use Planaday\Utility\DependencyInjection\Container;
use Planaday\Utility\DependencyInjection\InjectionImpossibleException;

class HiddenInput extends SelectableDataInputFieldTag {
	const TAG = 'hidden-input';
	const DEFAULT_TEMPLATE = 'hiddenInput';

	/**
	 * @param Container $registry
	 *
	 * @throws InjectionImpossibleException
	 */
	public function __construct(Container $registry) {
		parent::__construct(__DIR__, self::DEFAULT_TEMPLATE, $registry);
	}

	public function buildTag(): string {
		$parser = $this->getNewParser();
		return $parser->parse($this->getTemplate());
	}
}