{% extends request.ajax ? "layout_blank.html.twig" : "layout_default.html.twig" %}

{% block meta_title %}{{ 'Thank you'|trans }}{% endblock %}
{% block breadcrumb %}<li class="breadcrumb-item active" aria-current="page">{{ 'Thank you'|trans }}</li>{% endblock %}

{% block content %}
<div class="row">
    <div class="card ms-0 ms-md-3 w-100">
        <div class="card-header">
            <h1>{{ 'Thank you'|trans }}</h1>
            <p>{{ 'Your payment has been submitted and will be processed shortly. It may take some time for your invoice to be marked as paid.'|trans }}</p>
        </div>
        <div class="card-body">
            <p>{{ 'Payment for invoice received'|trans }}</p>
            <p>{{ 'You will be automatically redirected back to the invoice after 1 minute.'|trans }}</p>
            <div class="progress">
                <div class="progress-bar progress-bar-striped progress-bar-animated bg-success" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%"></div>
            </div>

            <script type="text/javascript">
                setTimeout(function() {
                    bb.redirect("{{ ('/invoice/'~invoice.hash)|link }}");
                }, 1 * 60 * 1000);
            </script>
        </div>
    </div>
</div>
{% endblock %}
