!function(e){formintorjs.define(["admin/settings/toggle-container","text!tpl/fields.html"],function(e,t){return e.extend({multiple:!1,events:{"change .wpmudev-toggle--design .forminator-field-singular":"on_change","click .wpmudev-label-name":"click_label","click .wpmudev-toggle-field":"toggle_field"},className:"wpmudev-option",click_label:function(e){e.preventDefault(),this.$el.find(".wpmudev-toggle--design .forminator-field-singular").click()},get_value_html:function(e,t){var l={type:"checkbox",class:"forminator-field-singular forminator-field-required",id:this.get_field_id(),name:this.get_name(),value:e.value,title:e.label};return this.get_saved_value()===e.value&&(l.checked="checked"),'<div class="wpmudev-toggle--design"><input '+this.get_field_attr_html(l)+' /><label for="'+this.get_field_id()+'" class="wpmudev-label-name"></label></div><label for="'+this.get_field_id()+'" class="wpmudev-toggle--label wpmudev-label--sm wpmudev-label-name">'+e.label+"</label>"},get_field_html:function(){var e={class:"wpmudev-toggle"};return'<div class="wpmudev-multiname"><div class="wpmudev-multiname--action"><div class="wpmudev-action--text"><div '+this.get_field_attr_html(e)+">"+this.get_values_html()+'</div></div><button class="wpmudev-action--button wpmudev-toggle-field"><span class="wpmudev-icon--plus" aria-hidden="true"></span><span class="wpmudev-text">Open field</span></button></div><div class="wpmudev-multiname--content"></div></div>'},on_change:function(){this.trigger("changed",this.get_value())},trigger_show:function(e){this.options.show&&this.options.show(e)},toggle_field:function(e){e.preventDefault(),this.$el.find(".wpmudev-multiname").toggleClass("wpmudev-is_active")}})})}(jQuery);