{%- import 'apostrophe-ui:components/buttons.html' as buttons -%}
{% set groups = apos.areas.widgetControlGroups(data.widget, data.options) %}
{% if groups.length %}
{% for group in groups %}
{% for button in group.controls %}
{% set label = button.label or '' %}
{% if button.label == '$editLabel' %}
{% set label = data.options.editLabel or data.manager.editLabel or 'Edit ' + data.manager.label %}
{% endif %}
{{ buttons.inGroup(label, button) }}
{% endfor %}