import{k as i,ax as s}from"../../../../../vendor-element-plus.js?ver=3.1.0";import{R as e}from"../../../../../RecipientTaggerForm.js?ver=3.1.0";import{C as n,B as t}from"../../../../../_conditions.js?ver=3.1.0";import{r,c as a,o as c,d as g,w as m,b as o,P as l,O as _}from"../../../../../vendor.js?ver=3.1.0";import{_ as d}from"../../../../../fc-bits-ui.js?ver=3.1.0";import"../../../../../fc-bits.js?ver=3.1.0";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:e,BasicSettings:t,ConditionsSettings:n},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(e,n,t,d,R,T){const V=r("basic-settings"),k=r("conditions-settings"),x=r("recipient-tagger-form"),B=i,E=s;return c(),a("div",p,[g(E,{"label-position":"top",class:"fcrm_single_recurring_camp_settings--form"},{default:m(()=>[o("div",f,[o("div",u,[o("h3",null,l(e.$t("Scheduling Settings")),1)]),o("div",v,[g(V,{campaign:t.campaign},null,8,["campaign"])])]),o("div",h,[o("div",b,[o("h3",null,l(e.$t("Sending Conditions")),1)]),o("div",S,[g(k,{sending_conditions:t.campaign.settings.sending_conditions},null,8,["sending_conditions"])])]),o("div",$,[o("div",j,[o("h3",null,l(e.$t("Recipients")),1)]),o("div",C,[g(x,{modelValue:t.campaign.settings.subscribers_settings,"onUpdate:modelValue":n[0]||(n[0]=i=>t.campaign.settings.subscribers_settings=i)},null,8,["modelValue"])])]),o("div",y,[g(B,{loading:R.saving,disabled:R.saving,onClick:n[1]||(n[1]=i=>T.updateCampaign()),type:"primary"},{default:m(()=>[_(l(e.$t("Save Settings")),1)],void 0,!0),_:1},8,["loading","disabled"])])],void 0),_:1})])}]]);export{R as default};
