text: const Toast = Swal.mixin({
    toast: true,
    position: 'top-end',
    showConfirmButton: false,
    timer: 3000,
    timerProgressBar: true,
    onOpen: (toast) => {
      toast.addEventListener('mouseenter', Swal.stopTimer)
      toast.addEventListener('mouseleave', Swal.resumeTimer)
    }
  })
  
  function delete_data(e,id,path){
  
    var is_delete = 0;
  
    const swalWithBootstrapButtons = Swal.mixin({
      customClass: {
        confirmButton: 'btn btn-success',
        cancelButton: 'btn btn-danger'
      },
      buttonsStyling: false
    })
  
    swalWithBootstrapButtons.fire({
      title: 'Are you sure?',
      text: "You won't be able to revert this!",
      icon: 'warning',
      showCancelButton: true,
      confirmButtonText: 'Yes, delete it!',
      cancelButtonText: 'No, cancel!',
      reverseButtons: true
    }).then((result) => {
      if (result.value) {
  
        $(e).find('span').show();
  
        $.ajax({
  
           type:'POST',
           url:path,
           data:{id:id},
           success:function(data){
  
  
              $(e).parent('td').parent('tr').hide();
  
              is_delete = 1;
              var message  = JSON.stringify(data.message).replace(/"/g, "");
        
              Toast.fire({
                icon: 'success',
                title: message
              })
                
           }
  
        });
  
  
  
       
        
      } else if (
        /* Read more about handling dismissals below */
        result.dismiss === Swal.DismissReason.cancel
      ) {
  
  
        swalWithBootstrapButtons.fire(
          'Cancelled',
          'Your imaginary file is safe :)',
          'error'
        )
      }
  
  
    })
  
  
  
    
  
  
  } // end function 