<?php

namespace Plainwork\UiWordPress\Renderer;

use Plainwork\Http\Request;
use Plainwork\Ui\Component\Link;

class AdminLinkRenderer
{
    public function __invoke(Link $el, Request $request, callable $next)
    {
        if ($el->isMenu()) {
            $el->withAttr('class', 'page-title-action');
        }

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