!function(e){formintorjs.define(["admin/settings/toggle"],function(t){return t.extend({multiple:!1,events:{"change .wpmudev-switch-container .forminator-field-singular":"on_change","click .wpmudev-label-container":"click_label"},className:"wpmudev-option",click_label:function(e){e.preventDefault(),this.$el.find(".wpmudev-switch-container .forminator-field-singular").click()},get_value_html:function(e,t){var i={type:"checkbox",class:"forminator-field-singular",id:this.get_field_id(),name:this.get_name(),value:e.value,title:e.label};return this.get_saved_value()===e.value&&(i.checked="checked"),labelClass="",e.labelSmall&&(labelClass=" wpmudev-label--sm"),e.labelBig&&(labelClass=" wpmudev-label--big"),e.hideTL?'<div class="wpmudev-toggle--design wpmudev-switch-container"><input '+this.get_field_attr_html(i)+' /><label for="'+this.get_field_id()+'" class="wpmudev-label-container"></label></div>':'<div class="wpmudev-toggle--design wpmudev-switch-container"><input '+this.get_field_attr_html(i)+' /><label for="'+this.get_field_id()+'" class="wpmudev-label-container"></label></div><label for="'+this.get_field_id()+'" class="wpmudev-toggle--label'+labelClass+' wpmudev-label-container">'+e.label+"</label>"},get_field_html:function(){var e="",t="";return this.options.has_content&&(e=" wpmudev-has_content"),this.options.containerClass&&(t=" "+this.options.containerClass),'<div class="wpmudev-toggle'+e+'">'+this.get_values_html()+'<div class="wpmudev-toggle--box'+t+' wpmudev-option--switch_content"></div></div>'},on_change:function(){this.trigger("changed",this.get_value())},get_value:function(){var e=this.get_field(),t=e.val();return e.is(":checked")&&t?t:""},trigger_show:function(e){this.toggle_wrapper(e),this.options.show&&this.options.show(e)},toggle_wrapper:function(){var t=this;"true"===this.get_value()?(this.$el.find(".wpmudev-toggle").hasClass("wpmudev-has_content")&&this.$el.find(".wpmudev-has_content").addClass("wpmudev-is_active"),this.$el.find(".wpmudev-toggle--box").hasClass("wpmudev-has_cols")?this.$el.find(".wpmudev-option--switch_content").css("display","flex"):this.$el.find(".wpmudev-option--switch_content").show(),this.options.hasOpposite&&setTimeout(function(){e(t.options.hasOpposite).hide()},100)):(this.$el.find(".wpmudev-toggle").hasClass("wpmudev-has_content")&&this.$el.find(".wpmudev-has_content").removeClass("wpmudev-is_active"),this.$el.find(".wpmudev-option--switch_content").hide(),this.options.hasOpposite&&setTimeout(function(){e(t.options.hasOpposite).show()},100))}})})}(jQuery);