{# @var group \EasyCorp\Bundle\EasyAdminBundle\Dto\ActionGroupDto #}
{# @var entity \EasyCorp\Bundle\EasyAdminBundle\Dto\EntityDto #}
{% set has_main_action = group.hasMainAction %}
{% set main_action = group.mainAction %}
{% if has_main_action %} {# render as a split button (main button with action + dropdown toggle) #}
{%- if main_action.label is not same as(false) -%}{{ main_action.label|trans|raw }}{%- endif -%}
{{ 'action.toggle_dropdown'|trans }}
{% else %} {# render as a single button that toggles the dropdown (no main action) #}
{%- if group.label is not same as(false) -%}{{ group.label|trans|raw }}{%- endif -%}
{% endif %}
{% for item in group.items %}
{% if item is iterable and item.type is defined %}
{% if item.type == 'divider' %}
{% elseif item.type == 'header' %}
{% endif %}
{% else %}
{# item is an ActionDto #}
{% endif %}
{% endfor %}