var FPF_Review_Handler=function(){function e(){if(this.noticeElement=document.querySelector(".fpf-review-reminder"),!this.noticeElement)return!1;this.handleRemindMeLaterBtn(),this.handleIAlreadyDid()}var t=e.prototype;return t.handleRemindMeLaterBtn=function(){var r=this;document.querySelector(".fpf-ask-later").addEventListener("click",function(e){var t=e.target.getAttribute("data-plugin-slug"),n=new FormData;n.append("_ajax_nonce",fpf_js_object.nonce),n.append("action","fpf_update_rate_reminder"),n.append("update","fpf_"+t+"_ask_later"),fetch(fpf_js_object.ajax_url,{method:"POST",body:n}).then(function(e){return e.json()}).then(function(e){e.error?console.log("Could not delete rate reminder. Error : "+e.error_type):r.noticeElement.remove()}).finally(function(){}),e.preventDefault()})},t.handleIAlreadyDid=function(){var r=this;document.querySelector(".fpf-delete-rate-reminder").addEventListener("click",function(e){var t=e.target.getAttribute("data-plugin-slug"),n=new FormData;n.append("_ajax_nonce",fpf_js_object.nonce),n.append("action","fpf_update_rate_reminder"),n.append("update","fpf_"+t+"_delete_rate_reminder"),fetch(fpf_js_object.ajax_url,{method:"POST",body:n}).then(function(e){return e.json()}).then(function(e){e.error?console.log("Could not delete rate reminder."):r.noticeElement.remove()}).finally(function(){}),e.preventDefault()})},e}();document.addEventListener("DOMContentLoaded",function(e){new FPF_Review_Handler});

