{% sw_extends '@Storefront/storefront/base.html.twig' %}
{% block base_main %}
{% if showUnreadMessagesModal %}
<!-- Modal -->
<div class="modal show" id="mailboxReminderModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" style="display: block; background: rgba(80, 80, 80, 0.8);">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header d-flex justify-content-center p-2">
<h5 class="modal-title" id="exampleModalLabel">{{ 'mailbox.popup.message'|trans }}</h5>
</div>
<div class="modal-footer d-flex justify-content-center p-3">
<a href="{{ seoUrl('storefront.account.mailbox.home') }}" class="btn btn-primary">{{ 'mailbox.popup.viewButton'|trans }}</a>
<a href="#" id="hideMailboxReminderButton" class="btn">{{ 'mailbox.popup.remindLaterButton'|trans }}</a>
</div>
</div>
</div>
</div>
<script>
function hideMailboxReminderModal(event) {
event.preventDefault();
var xhr = new XMLHttpRequest();
xhr.open("GET", "{{ seoUrl('storefront.mailbox.remindlater') }}", true);
xhr.send();
document.getElementById('mailboxReminderModal').classList.remove('show');
document.getElementById('mailboxReminderModal').style.display = 'none';
}
document.getElementById('hideMailboxReminderButton').addEventListener('click', hideMailboxReminderModal);
</script>
{% endif %}
{{ parent() }}
{% endblock %}