import Swal from 'sweetalert2'
window.Swal = Swal


window.confirmDelete = function (callback) {

    Swal.fire({
        title: 'Delete data?',
        text: 'This action cannot be undone',
        icon: 'warning',
        showCancelButton: true,
        confirmButtonColor: '#dc2626',
        cancelButtonColor: '#6b7280',
        confirmButtonText: 'Yes, delete'
    }).then((result) => {

        if (result.isConfirmed) {
            callback()
        }

    })

}
