document.addEventListener('DOMContentLoaded', function() {
});
function confirmDelete(id) {
Swal.fire({
html: `
Data yang dihapus akan hilang secara permanen dari sistem dan tidak dapat dikembalikan.
`,
showCancelButton: true,
confirmButtonText: 'Ya, Hapus Permanen',
cancelButtonText: 'Batalkan',
buttonsStyling: false,
customClass: {
confirmButton: 'px-6 py-2.5 bg-red-600 text-white rounded-xl font-bold hover:bg-red-700 transition shadow-lg shadow-red-200 mr-2',
cancelButton: 'px-6 py-2.5 bg-slate-100 text-slate-600 rounded-xl font-bold hover:bg-slate-200 transition'
},
width: '400px',
reverseButtons: true
}).then((result) => {
if (result.isConfirmed) {
Swal.fire({
html: `
`,
width: '250px',
showConfirmButton: false,
allowOutsideClick: false
});
const form = document.getElementById('delete-form-' + id);
if (form) form.submit();
}
})
}