{% set items = _args.items|default([])|filter((item) => item is not empty and (not item.permission is defined or is_granted(item.permission))) %}
<div class="hc-button-segment">
{% for item in items %}
<a href="{{ item.link|e('html_attr') }}" title="{{ item.title }}" class="hc-button hc-button--primary hc-button--brand hc-button--lg{% if item.active %} hc-button--selected{% endif %}">{{ item.title }}</a>
{% endfor %}
</div>