import{aD as e,aA as a,aw as t,e as s,ax as i}from"./vendor-element-plus.js?ver=3.1.8";import{aQ as l,W as o,X as d,Y as m,a5 as r,ab as _,a8 as n,_ as c}from"./vendor.js?ver=3.1.8";import{E as u}from"./BlockComposer.js?ver=3.1.8";import{I as p}from"./_FormBuilder2.js?ver=3.1.8";import{S as b}from"./TestEmail.js?ver=3.1.8";import{_ as g}from"./fc-bits-ui.js?ver=3.1.8";const v={class:"email_composer_wrapper"},h={key:1};const f=g({name:"EmailComposer",props:["campaign","label_align","disable_subject","disable_templates","disable_fixed","enable_test","show_merge","extra_tags","show_audit","disable_gutenberg_autosave","hide_gutenberg_save_button"],emits:["save"],components:{EmailBlockComposer:u,InputPopover:p,SendTestEmail:b},data:()=>({smartcodes:window.fcAdmin.globalSmartCodes,email_subject_status:!0}),methods:{triggerSave(){this.$emit("save")},resetSubject(){this.email_subject_status=!1,this.$nextTick(()=>{this.email_subject_status=!0})}},mounted(){this.extra_tags&&(this.smartcodes=[...this.smartcodes,...this.extra_tags]),window.fcAdmin.extendedSmartCodes&&(this.smartcodes=[...this.smartcodes,...window.fcAdmin.extendedSmartCodes])}},[["render",function(u,p,b,g,f,j){const x=l("input-popover"),w=t,S=a,E=s,k=e,$=i,C=l("email-block-composer"),V=l("send-test-email");return o(),d("div",v,[b.disable_subject?n("",!0):(o(),m($,{key:0,"label-position":b.label_align,model:b.campaign},{default:r(()=>[_(k,{gutter:20,class:"mb-10"},{default:r(()=>[_(S,{sm:24,md:12},{default:r(()=>[_(w,{label:u.$t("Email Subject")},{default:r(()=>[f.email_subject_status?(o(),m(x,{key:0,doc_url:"https://fluentcrm.com/docs/merge-codes-smart-codes-usage/",popper_extra:"fc_with_c_fields",placeholder:u.$t("Email Subject"),data:f.smartcodes,modelValue:b.campaign.email_subject,"onUpdate:modelValue":p[0]||(p[0]=e=>b.campaign.email_subject=e)},null,8,["placeholder","data","modelValue"])):n("",!0)],void 0,!0),_:1},8,["label"])],void 0,!0),_:1}),_(S,{sm:24,md:12},{default:r(()=>[_(w,{label:u.$t("Email Pre-Header")},{default:r(()=>[_(E,{placeholder:u.$t("Email Pre-Header"),modelValue:b.campaign.email_pre_header,"onUpdate:modelValue":p[1]||(p[1]=e=>b.campaign.email_pre_header=e)},null,8,["placeholder","modelValue"])],void 0,!0),_:1},8,["label"])],void 0,!0),_:1})],void 0,!0),_:1})],void 0),_:1},8,["label-position","model"])),_(C,{onSave:p[2]||(p[2]=e=>j.triggerSave()),iframe_nav_mode:"compose","hide-back-btn":!0,"hide-next-btn":!0,"hide-save-btn":b.hide_gutenberg_save_button,"disable-gutenberg-autosave":b.disable_gutenberg_autosave,show_audit:b.show_audit,extra_tags:b.extra_tags,show_merge:!0,enable_template_save:!0,onTemplate_inserted:p[3]||(p[3]=e=>j.resetSubject()),disable_fixed:b.disable_fixed,enable_templates:!b.disable_templates,campaign:b.campaign},{fc_editor_actions:r(()=>[c(u.$slots,"actions")]),_:3},8,["hide-save-btn","disable-gutenberg-autosave","show_audit","extra_tags","disable_fixed","enable_templates","campaign"]),c(u.$slots,"after_block_composer"),b.enable_test?(o(),d("div",h,[_(V,{campaign:b.campaign},null,8,["campaign"])])):n("",!0)])}]]);export{f as E};
