<?php

namespace Plainwork\Ui\Renderer\Form;

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

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

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