!function(e){formintorjs.define(["text!tpl/appearance.html"],function(a){return Backbone.View.extend({mainTpl:Forminator.Utils.template(e(a).find("#appearance-section-emails-tpl").html()),className:"wpmudev-box-body",initialize:function(e){return this.render()},render:function(){this.$el.html(this.mainTpl()),this.render_user_email(),this.render_admin_email()},render_user_email:function(){var e=new Forminator.Settings.ToggleContainer({model:this.model,id:"appearance-user-email",name:"use-user-email",hide_label:!0,values:[{value:"true",label:Forminator.l10n.appearance.send_user_email}]}),a=new Forminator.Settings.Text({model:this.model,id:"emails-user-email-title",name:"user-email-title",placeholder:Forminator.l10n.appearance.subject,inputLarge:"true"}),i=new Forminator.Settings.Editor({model:this.model,id:"emails-user-email-editor",name:"user-email-editor",placeholder:Forminator.l10n.appearance.body,enableFormData:!0});e.$el.find(".wpmudev-option--switch_content").append([a.el,i.el]),this.$el.find(".appearance-section-form-user-email").append(e.el)},render_admin_email:function(){var e=new Forminator.Settings.ToggleContainer({model:this.model,id:"appearance-admin-email",name:"use-admin-email",hide_label:!0,values:[{value:"true",label:Forminator.l10n.appearance.send_admin_email}]}),a=new Forminator.Settings.Text({model:this.model,id:"emails-admin-email-title",name:"admin-email-title",placeholder:Forminator.l10n.appearance.subject,inputLarge:"true"}),i=this.get_admin_email_recipents(),n=new Forminator.Settings.Editor({model:this.model,id:"emails-admin-email-editor",name:"admin-email-editor",placeholder:Forminator.l10n.appearance.body,enableFormData:!0,enableAllFormFields:!0,enablePostData:!0,enableUpload:!0});e.$el.find(".wpmudev-option--switch_content").append([i.el,a.el,n.el]),this.$el.find(".appearance-section-form-user-admin-email").append(e.el)},get_admin_email_recipents:function(){return new Forminator.Settings.Tag({model:this.model,id:"emails-admin-email-recipents",name:"admin-email-recipients",tags_options:{placeholder:Forminator.l10n.appearance.admin_email_recipient,ajax:{url:Forminator.Data.ajaxUrl,type:"POST",delay:350,data:function(e){return{action:"forminator_builder_search_emails",q:e.term}},processResults:function(e){return{results:e.data}},cache:!0},createTag:function(a){var i=e.trim(a.term);return Forminator.Utils.is_email_wp(i)?{id:i,text:i}:null}}})}})})}(jQuery);