(()=>{"use strict";class e{constructor(e,t){this.inscriptionTableSelector=e,this.buttonDeleteSelector=t}init(){const e=document.querySelector(this.inscriptionTableSelector);e?.addEventListener?.("click",e=>{e.preventDefault();const t=e.target.closest(this.buttonDeleteSelector);t&&this.handleDelete(t)},!0)}handleDelete(e){const t=e.getAttribute("href");t&&("function"==typeof swal?this.showConfirmation(t):globalThis.location.href=t)}showConfirmation(e){swal({title:"Eliminar inscripción",text:"Esta acción no se puede deshacer. ¿Deseas continuar?",icon:"warning",className:"tbk-swal-modal",buttons:{cancel:{text:"Cancelar",visible:!0,closeModal:!0},confirm:{text:"Eliminar",value:!0,closeModal:!0}},dangerMode:!0}).then(function(t){t&&(globalThis.location.href=e)})}}(class{static ready(e){"function"==typeof e&&("loading"!==document.readyState?Promise.resolve().then(e):document.addEventListener("DOMContentLoaded",e,{once:!0}))}}).ready(()=>{new e(".transbank_inscriptions",".tbk-js-delete-inscription").init()})})();