import{k as i,ax as s}from"../../../../../vendor-element-plus.js?ver=3.1.10";import{aQ as e,W as n,X as t,ab as a,a5 as r,Z as c,aa as g,a9 as m}from"../../../../../vendor.js?ver=3.1.10";import{R as o}from"../../../../../RecipientTaggerForm.js?ver=3.1.10";import{C as l,B as _}from"../../../../../_conditions.js?ver=3.1.10";import{_ as d}from"../../../../../fc-bits-ui.js?ver=3.1.10";import"../../../../../fc-bits.js?ver=3.1.10";const p={class:"fcrm_single_recurring_camp_settings"},f={class:"fcrm_single_recurring_camp_settings--form-item"},u={class:"fcrm_single_recurring_camp_settings--form-item-header"},v={class:"fcrm_single_recurring_camp_settings--form-schedule"},h={class:"fcrm_single_recurring_camp_settings--form-item"},b={class:"fcrm_single_recurring_camp_settings--form-item-header"},S={class:"fcrm_single_recurring_camp_settings--form-conditions"},$={class:"fcrm_single_recurring_camp_settings--form-item"},j={class:"fcrm_single_recurring_camp_settings--form-item-header"},C={class:"fcrm_single_recurring_camp_settings--form-recipients"},y={class:"fcrm_single_recurring_camp_settings--form-footer"};const R=d({name:"RecurringEmailSettings",props:["campaign"],components:{RecipientTaggerForm:o,BasicSettings:_,ConditionsSettings:l},data:()=>({saving:!1}),methods:{updateCampaign(){this.saving=!0;const i={campaign:JSON.stringify({settings:this.campaign.settings,title:this.campaign.title})};this.$post("recurring-campaigns/"+this.campaign.id+"/update-settings",i).then(i=>{this.$notify.success(i.message)}).catch(i=>{this.handleError(i)}).finally(()=>{this.saving=!1})}},mounted(){this.changeTitle(this.$t("Settings")+" - "+this.campaign.title)}},[["render",function(o,l,_,d,R,T){const V=e("basic-settings"),k=e("conditions-settings"),x=e("recipient-tagger-form"),B=i,E=s;return n(),t("div",p,[a(E,{"label-position":"top",class:"fcrm_single_recurring_camp_settings--form"},{default:r(()=>[c("div",f,[c("div",u,[c("h3",null,g(o.$t("Scheduling Settings")),1)]),c("div",v,[a(V,{campaign:_.campaign},null,8,["campaign"])])]),c("div",h,[c("div",b,[c("h3",null,g(o.$t("Sending Conditions")),1)]),c("div",S,[a(k,{sending_conditions:_.campaign.settings.sending_conditions},null,8,["sending_conditions"])])]),c("div",$,[c("div",j,[c("h3",null,g(o.$t("Recipients")),1)]),c("div",C,[a(x,{modelValue:_.campaign.settings.subscribers_settings,"onUpdate:modelValue":l[0]||(l[0]=i=>_.campaign.settings.subscribers_settings=i)},null,8,["modelValue"])])]),c("div",y,[a(B,{loading:R.saving,disabled:R.saving,onClick:l[1]||(l[1]=i=>T.updateCampaign()),type:"primary"},{default:r(()=>[m(g(o.$t("Save Settings")),1)],void 0,!0),_:1},8,["loading","disabled"])])],void 0),_:1})])}]]);export{R as default};
