{% set text = _args.text %}
{% set link = _args.link|default(null) %}
{% set actions = _args.actions|default([]) %}
{% set sidepanel = _args.sidepanel|default(null) %}
{% set modal = _args.modal|default(null) %}
{% set target = _args.target|default(null) %}
<td>
{% if link %}<a
href="{{ link|e('html_attr') }}"
{% if target %}
target="{{ target }}"
{% endif %}
{% if sidepanel %}
data-toggle="sidepanel"
data-target="#{{ sidepanel }}"
{% endif %}
{% if modal %}
data-toggle="modal"
data-target="#{{ modal }}"
{% endif %}
>{% endif %}
<span>{{- text -}}</span>
{% if link %}</a>{% endif %}
{% if actions is not empty %}
<span class="table__actions">
{% for action in actions|filter(a => a is not empty) %}
{% include '@ui2022/button--a.html.twig' with {
styles: 'white md',
}|merge(action) %}
{% endfor %}
</span>
{% endif %}
</td>