System.register([],(function(e,t){"use strict";return{execute:function(){jQuery(document).ready((function(e){const t=e("#saai-start-chat-setup");e(".storeagent-chat-setup-notice"),t.on("click",(function(a){a.preventDefault(),t.prop("disabled",!0).addClass("loading"),e.ajax({url:saaiChatSetup.ajaxUrl,type:"POST",data:{action:"saai_start_chat_setup",nonce:saaiChatSetup.nonce},success:function(e){e.success?window.location.reload():alert(e.data.message)},error:function(){alert("There was an error while setting up StoreAgent Chat. Please try again.")},complete:function(){t.prop("disabled",!1).removeClass("loading")}})}))}))}}}));
