System.register([],(function(e,t){"use strict";return{execute:function(){jQuery(document).ready((function(e){const t=e('.notice[data-notice-id="saai-no-agents"]'),n=e("#saai-enable-all-agents");t.on("click",".notice-dismiss",(function(n){n.preventDefault(),e.ajax({url:saaiNoAgentsNotice.ajaxUrl,type:"POST",data:{action:"saai_dismiss_no_agents_notice",nonce:saaiNoAgentsNotice.dismissNonce},success:function(){t.fadeOut()}})})),n.on("click",(function(n){n.preventDefault();const a=e(this);a.prop("disabled",!0).text("Enabling..."),e.ajax({url:saaiNoAgentsNotice.ajaxUrl,type:"POST",data:{action:"saai_enable_all_agents",nonce:saaiNoAgentsNotice.nonce},success:function(e){e.success?(t.removeClass("notice-info").addClass("notice-success"),t.find("p").text(e.data.message),a.remove(),setTimeout((()=>{t.fadeOut()}),3e3)):(t.removeClass("notice-info").addClass("notice-error"),t.find("p").text(e.data.message),a.prop("disabled",!1).text("Turn On All Defaults"))},error:function(){t.removeClass("notice-info").addClass("notice-error"),t.find("p").text("An error occurred while enabling the agents. Please try again."),a.prop("disabled",!1).text("Turn On All Defaults")}})}))}))}}}));
