<?php

namespace Plainwork\Ui\Renderer\Form;

use Plainwork\Http\Request;
use Plainwork\Ui\Component\Form\TextInput;

final class TextInputRenderer
{
    public function __invoke(TextInput $el, Request $request, callable $next)
    {
        $el = $el
            ->withTag('input')
            ->withAttr('type', 'text')
            ->withAttr('value', $el->getValue())
            ;

        return $next($el, $request);
    }
}
