{% set classNames = classNames | default([]) %}
{% set jsClassNames = jsClassNames | default([]) %}
{% set attributes = attributes | default([]) %}
{% set service = service | default(false) %}
{% set buttonText = buttonText | default('') %}
{# if service is given, and no other button text, then set buttonText to following: #}
{% if buttonText is empty and service is not empty %}
{% set buttonText = ('cookies.accept-cookies.service ' ~ service)|trans %}
{% endif %}
<div class="{{ classNames['wrapper'] | default('consent embed-responsive embed-responsive-16by9 ratio ratio-16x9') }} {{ jsClassNames['wrapper'] | default('js-consent') }}"
hidden="hidden"
{% for key, value in attributes['wrapper'] | default([]) %}
{{key}}="{{value}}"
{% endfor %}
{% if service %}
data-consent-service="{{ service }}"
{% endif %}
>
<div class="{{ classNames['overlay'] | default('consent__overlay embed-responsive-item ration-item') }} {{ jsClassNames['overlay'] | default('js-consent__overlay') }}"
{% for key, value in attributes['overlay'] | default([]) %}
{{key}}="{{value}}"
{% endfor %}
>
{{ overlayText|default('cookies.accept-cookies-to-show-external-content' | trans) }}
<button type="button" class="{{ classNames['button'] | default('btn btn-primary') }} {{ jsClassNames['button'] | default('js-consent__accept-btn') }}"
{% for key, value in attributes['button'] | default([]) %}
{{key}}="{{value}}"
{% endfor %}
>
{{ buttonText|default('cookies.accept-cookies' | trans) }}
</button>
</div>
<template class="{{ classNames['template'] | default('embed-responsive-item ration-item') }} {{ jsClassNames['template'] | default('js-consent__template') }}"
{% for key, value in attributes['template'] | default([]) %}
{{key}}="{{value}}"
{% endfor %}
>
{% block consentIframe %}
{{ iframeMarkup|default('')|raw }}
{% endblock %}
</template>
</div>