System.register(["./state-legacy.BfeTROjz.js"],(function(e,t){"use strict";var n;return{setters:[e=>{n=e.b}],execute:function(){e({a:function(){const e=jQuery,t=e("#saai-check-all"),n=e(".saai-generate-field"),a=n.length,i=n.filter(":checked").length;0===i?(t.prop("checked",!1),t.prop("indeterminate",!1)):i===a?(t.prop("checked",!0),t.prop("indeterminate",!1)):(t.prop("checked",!1),t.prop("indeterminate",!0))},b:function(e){n.modal&&0!==n.modal.length&&n.modal.find(".saai-error").text(e).show()},c:function(e){const t=jQuery,n=t('<div class="notice notice-success is-dismissible"><p>'+e+"</p></div>");t(".wrap > h1").length>0?t(".wrap > h1").after(n):t(".wp-header-end").length>0?t(".wp-header-end").after(n):t("body").prepend(n),setTimeout((()=>{n.fadeOut(300,(function(){t(this).remove()}))}),3e3)},h:function(){n.loading&&n.loading.hide(),n.generateButton&&n.generateButton.prop("disabled",!1)},s:function(){n.loading&&n.loading.show(),n.generateButton&&n.generateButton.prop("disabled",!0)},u:function(){const e=jQuery,t=e(".saai-current-values"),n=e('input[name="generate_alt"]').is(":checked"),a=e('input[name="generate_caption"]').is(":checked"),i=e('input[name="generate_title"]').is(":checked"),s=e('input[name="generate_description"]').is(":checked");e('.saai-current-field[data-field="alt"]').toggleClass("show",n),e('.saai-current-field[data-field="caption"]').toggleClass("show",a),e('.saai-current-field[data-field="title"]').toggleClass("show",i),e('.saai-current-field[data-field="description"]').toggleClass("show",s);const r=n||a||i||s;t.toggleClass("empty",!r)}})}}}));
