<?php


namespace AutoAdmin\Bundle\BrickBuilder\Brick\Handler;


use AutoAdmin\Bundle\BrickBuilder\Brick\BrickHandlerManagerInterface;
use AutoAdmin\Bundle\BrickBuilder\Brick\BrickRendererInterface;
use AutoAdmin\Bundle\BrickBuilder\Brick\Config\BrickConfiguration;
use AutoAdmin\Bundle\BrickBuilder\Brick\Config\Configurator;
use AutoAdmin\Bundle\BrickBuilder\Model\BrickInterface;
use AutoAdmin\Bundle\BrickBuilder\Model\RenderingBrickInterface;
use Twig\Environment;

interface BrickHandlerInterface
{
    public function setTwig(Environment $twig);

    public function process(BrickInterface $brick): void;

    public function preRender(BrickInterface $brick, BrickHandlerManagerInterface $manager): RenderingBrickInterface;

    public function render(RenderingBrickInterface $brick, BrickRendererInterface $renderer): ?string;

    public function configure(Configurator $configurator);

    public function getConfiguration(): BrickConfiguration;

    public function getBrickType(): ?string;
}
