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