"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var WPML_core=WPML_core||{};WPML_core.languageSwitcher=function(o,i){var n,a,t,r,s,l="wpml-ls-inline-styles-additional-css",p="wpml-ls-inline-styles-dialog",e=function(){d(),u(),f(),m(),W(),C(),x(),M(),V(),X(),R(),Z(),P(),z(),T(),D()},c=function(){var t;o("#"+l).length<1&&((t=o("");o("#"+t).replaceWith(e)})},V=function(){t.on("change",".js-wpml-ls-template-selector",function(){var t=o(this).val(),s=o(this).closest(".js-wpml-ls-subform"),t=i.templates[t].force_settings;s.find(".js-wpml-ls-to-include input").prop("disabled",!1),jQuery.each(t,function(t,e){(1===e?s.find(".js-wpml-ls-setting-"+t).prop("checked",!0):s.find(".js-wpml-ls-setting-"+t).prop("checked",!1)).prop("disabled",!0)})})},X=function(){t.on("change",".js-wpml-ls-menu-is-hierarchical",function(){var t=parseInt(o(this).val()),e=o(this).closest(".js-wpml-ls-subform").find(".js-wpml-ls-setting-display_link_for_current_lang");e.prop("disabled",!1),1===t&&e.prop("checked",!0).prop("disabled",!0)})},Y=_.debounce(function(t){o(".js-wpml-ls-dialog-save").prop("disabled",!0);var e=t.find(".js-wpml-ls-preview");0")).attr("rel","stylesheet"),s.attr("type","text/css"),s.attr("media","all"),s.attr("href",t[e]),s.prependTo("head"))},ot=function(t){var e,s;if("undefined"!==_typeof(t)&&null!==t)for(e=0;e<\/script>")).attr("type","text/javascript"),s.attr("src",t[e]),s.prependTo("head"))};return{init:function(){n=o("#wpml-ls-settings-form"),a=o("#wpml-ls-dialog"),t=n.add(a),c(),g(),L(),w(),e(),h(),o(document).trigger("wpml_ls_admin_loaded")}}}(jQuery,wpml_language_switcher_admin),jQuery(function(){WPML_core.languageSwitcher.init()});
//# sourceMappingURL=language-switchers-settings.min.js.map