<div id="ovlPayment">
    <div class="dialogHeader">
        <div class="dialogIcon">
            {{#if model.success}}
            {{icon 'checkmark'}}
            {{else}}
            {{icon 'error'}}
            {{/if}}
        </div>
        <h2 class="dialogTitle">
            {{#if model.success}}
            {{translate 'invoicePaymentSuccessTitle'}}
            {{else}}
            {{translate 'invoicePaymentErrorTitle'}}
            {{/if}}
        </h2>
        <div class="buttonContainer">
        </div>
    </div>

    <div class="dialogBody">

        <div class="dialogBlock invoiceContainer">
            {{#if model.success}}
            <p>{{translate 'thanksForPayment'}}</p>
            <p>{{translate 'invoicePaymentSuccessMessage'}}</p>
            {{else if model.exception}}
            <p>{{translate 'invoicePaymentExceptionMessage'}}</p>
            {{else}}
            {{#if model.signerr}}
            <p>{{translate 'invoicePaymentShasingErrorMessage'}}</p>
            {{/if}}
            <p>{{translate 'invoicePaymentErrorMessage'}}</p>
            {{/if}}

            {{#if model.success}}
            {{crystal-report reportContext='Rechnung' caption=(translate 'downloadReceipt') reportId=model.invoice.InvoiceReportId dataKey=model.invoice.Id target='_blank'}}
            {{else}}
            {{#if model.pdfinvoice}}
            {{crystal-report reportContext='Rechnung' caption=(translate 'downloadPdf') reportId=model.invoice.InvoiceReportId dataKey=model.invoice.Id target='_blank'}}
            {{/if}}
            {{/if}}
        </div>
    </div>

    <div class="dialogFooter">
        <div class="buttonContainer">
            <button id="btnNext" type="button" class="textButton" {{action 'closeRoute'}}>
                {{icon 'close'}}
                <div>{{translate 'close'}}</div>
            </button>
        </div>
    </div>

</div>