
function printConfirmSuccess(){
    return '<div class="swal2-icon swal2-success swal2-animate-success-icon" style="display: flex;"><div class="swal2-success-circular-line-left" style="background-color: rgb(255, 255, 255);"></div><span class="swal2-success-line-tip"></span><span class="swal2-success-line-long"></span><div class="swal2-success-ring"></div><div class="swal2-success-fix" style="background-color: rgb(255, 255, 255);"></div><div class="swal2-success-circular-line-right" style="background-color: rgb(255, 255, 255);"></div></div>';
}

function printConfirmError(){
    return '<div class="swal2-icon swal2-error swal2-animate-error-icon" style="display: flex;"><span class="swal2-x-mark"><span class="swal2-x-mark-line-left"></span><span class="swal2-x-mark-line-right"></span></span></div>';
}

function getConfirmModal(elementModal){
    printModal = '<div class="modal fade" id="ResultQRCode" tabindex="-1" role="dialog" aria-hidden="true" style="z-index: 1100;">';
    printModal += '<div class="modal-dialog" role="document">';
    printModal += '<div class="card mb-3 text-center">';
    if (elementModal["evenement"] !== null) {
        printModal += '<div class="card-header">' + elementModal["evenement"] + '</div>';
    }
    printModal += '<div class="card-body">';

    if (elementModal["result"] === true) {
        printModal += printConfirmSuccess();
    } else {
        printModal += printConfirmError();
    }

    printModal += elementModal["description"];

    printModal += '</div>';
    if (elementModal["salarie"] !== null) {
        printModal += '<div class="card-footer">' + elementModal["salarie"] + '</div>';
    }
    printModal += '</div>';
    printModal += '</div>';
    printModal += '</div>';
    return printModal;
}
