{% set text = _args.text %}
{% set htmlId = _args.htmlId|default(null) %}
{% set link = _args.path is defined ? (_args.path is not iterable ? path(_args.path) : path(_args.path[0])) : _args.link|default('#') %}
{% set path = _args.path|default('') %}
{% set target = _args.target|default(null) %}
{% set active = (_args.active is defined) ? (_args.active is same as(true)) : (classify('active', path) is same as('active')) %}
<li class="{% if active is same as(true) %}active{% endif %}">
<a
href="{{ link }}"
{% if htmlId is not null %}id="{{ htmlId }}"{% endif %}
{% if target is not null %}target="{{ target }}"{% endif %}
>{{ text }}</a>
</li>