jQuery(function(t){t(document.body).on("change",".smartpay-integrations .custom-control-input",function(a){a.preventDefault();var n="deactivate",o=t(a.target).data("namespace"),e=t("#smartpay_integrations_toggle_activation").val();a.target.checked&&(n="activate");var i={action:"toggle_integration_activation",payload:{action:n,namespace:o,nonce:e}};jQuery.post(smartpay.ajaxUrl,i,function(n){n?(t(a.target).parents(".actions").find(".integration-status").html(n),window.location.reload()):console.error("Something wrong!")})})});