"use strict";let jetSmartFiltersSettinsMixin={data:function(){return{pageOptions:window.jetSmartFiltersSettingsConfig.settingsData,preparedOptions:{},savingStatus:!1,ajaxSaveHandler:null}},watch:{pageOptions:{handler(t){let e={};for(let s in t)t.hasOwnProperty(s)&&(e[s]=t[s].value);this.preparedOptions=e,this.saveOptions()},deep:!0}},methods:{saveOptions:function(){var t=this;t.savingStatus=!0,t.ajaxSaveHandler=jQuery.ajax({type:"POST",url:window.jetSmartFiltersSettingsConfig.settingsApiUrl,dataType:"json",data:t.preparedOptions,beforeSend:function(e,s){e.setRequestHeader("X-WP-Nonce",window.jetSmartFiltersSettingsConfig.nonce),null!==t.ajaxSaveHandler&&t.ajaxSaveHandler.abort()},success:function(e,s,a){t.savingStatus=!1,"success"===e.status&&t.$CXNotice.add({message:e.message,type:"success",duration:3e3}),"error"===e.status&&t.$CXNotice.add({message:e.message,type:"error",duration:3e3})}})}}};Vue.component("jet-smart-filters-general-settings",{template:"#jet-dashboard-jet-smart-filters-general-settings",mixins:[jetSmartFiltersSettinsMixin]}),Vue.component("jet-smart-filters-indexer-settings",{template:"#jet-dashboard-jet-smart-filters-indexer-settings",mixins:[jetSmartFiltersSettinsMixin]}),Vue.component("jet-smart-filters-url-structure-settings",{template:"#jet-dashboard-jet-smart-filters-url-structure-settings",mixins:[jetSmartFiltersSettinsMixin]}),Vue.component("jet-smart-filters-ajax-request-type",{template:"#jet-dashboard-jet-smart-filters-ajax-request-type",mixins:[jetSmartFiltersSettinsMixin]});