text: function WP_AMP_THEMES_SWITCHER(){var e=this;this.type="wp_amp_themes_switcher",this.DOMDoc,this.init=function(){WATJSInterface=window.parent.WATJSInterface,this.initSelectButtons()},this.initSelectButtons=function(){jQuery("."+e.type+"_select").click(function(){var t=jQuery(this).attr("data-theme");confirm("If you change your theme you will lose all the customization options of your current theme. Are you sure you want to continue?")&&e.switchTheme(t)})},this.switchTheme=function(e){WATJSInterface.Preloader.start({message:"Switching theme ..."}),jQuery.get(ajaxurl,{action:"wp_amp_themes_switch_theme",theme:e},function(e){if(WATJSInterface.Preloader.remove(100),e=Boolean(Number(String(e)))){t="Your AMP theme has been successfully changed.";WATJSInterface.Loader.display({message:t}),setTimeout(function(){location.reload()},3e3)}else{var t="There was an error. Please reload the page and try again.";WATJSInterface.Loader.display({message:t})}})}}