{% sw_extends '@Resources/storefront/component/privacy-notice.html.twig' %}
{% block component_privacy_notice %}
<div class="form-text privacy-notice">
{% block component_privacy_title %}
{{ parent() }}
{% endblock %}
{% block component_privacy_dpi %}
{% if config('core.loginRegistration.requireDataProtectionCheckbox') == 1 %}
{# CIO-AI-Driven: Split privacy and TOS into two separate required checkboxes #}
<div class="data-protection-information">
<div class="custom-control custom-checkbox data-protection-information">
{% block component_privacy_dpi_checkbox %}
{{ parent() }}
{% endblock %}
{% block component_privacy_dpi_label %}
<label class="custom-control-label no-validation"
for="acceptedDataProtection">
{{ "general.dataProtectionCheckboxLabel"|trans({
'%privacyUrl%': path('frontend.cms.page',{ id: config('core.basicInformation.privacyPage') })
})|raw }}
{{ "general.required"|trans|sw_sanitize }}
</label>
{% endblock %}
</div>
<div class="custom-control custom-checkbox tos-information">
<input type="checkbox"
class="custom-control-input{% if formViolations.getViolations('/acceptedTos') is not empty %} is-invalid{% endif %}"
name="acceptedTos"
required="required"
value="1"
id="acceptedTos"
{% if data.get('acceptedTos') %}checked="checked"{% endif %}>
<label class="custom-control-label no-validation"
for="acceptedTos">
{{ 'general.tosCheckboxLabel'|trans({
'%tosUrl%': path('frontend.cms.page',{ id: config('core.basicInformation.tosPage') })
})|raw }}
{{ "general.required"|trans|sw_sanitize }}
</label>
</div>
</div>
{% else %}
<div class="data-protection-information">
{% block component_privacy_label %}
{{ parent() }}
{% endblock %}
</div>
{% endif %}
{% endblock %}
</div>
{% endblock %}