<?php

namespace Planaday\Html\Tags\Utility\InfoBlock;

use Planaday\Html\Tags\Tag;
use Planaday\Utility\DependencyInjection\Container;
use Planaday\Utility\DependencyInjection\InjectionImpossibleException;

class InfoBlock extends Tag {
	const TAG = 'info-block';
	const DEFAULT_TEMPLATE = 'infoBlock';

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

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