{# area needs its own copy of the widget options as #}
{# JSON, for adding new widgets #}
{%- set canEdit = data.area._edit and data.options.edit != false -%}
{%- set isSingleton = data.options.limit == 1 and data.options.type -%}
{%- if canEdit -%}
{%- if isSingleton -%}
{% include "singletonControls.html" %}
{%- else -%}
{% include "areaControls.html" %}
{%- endif -%}
{%- endif -%}
{%- for widget in data.area.items -%}
{%- set widgetOptions = data.options.widgets[widget.type] or {} -%}
{%- if not canEdit -%}
{%- set widgetOptions = apos.utils.merge(widgetOptions, { edit: false }) -%}
{%- endif -%}
{{ apos.areas.widget(widget, widgetOptions) }}
{%- endfor -%}
{%- if canEdit %}