import{aa as s}from"./_applist-tangy-colts-beg-36.js";import{_ as e}from"./main-tangy-colts-beg.js";import{h as t,s as l}from"./machine.-tangy-colts-beg-869.js";import{f as o,a as n}from"./machineh-tangy-colts-beg-773.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(i,a){return this.cache.has(i)?this.cache.get(i):(this.cache.set(i,a),a)}};const _=s(({helpers:i})=>({states:{components:[{addItemButtonLabel:"Add Field",componentName:i.componentName.repeaterField,fieldsMetaData:[{componentName:i.componentName.select,label:e("Field"),name:"mailPoetField",options:[],required:!0,showSearch:!0,style:{width:150},value:""},{componentName:i.componentName.mixInput,label:e("Value"),name:"value",required:!0,value:[],wrapperClassName:"w-100"}],id:"field-map",label:e("Field Map"),labelActionIconName:"refresh-cw",labelActionOnClick:"REFETCH_FIELDS",labelActionText:e("Refetch Fields"),nonRemovableRows:[],onChange:"HANDLE_FIELD_MAPPING",path:"fieldMap",render:!0,value:[],wrapperClassName:"mt-3"},{componentName:i.componentName.select,helperText:e("An array containing list ids into which subscriber will be added. In case that the list is empty a subscriber will be created; but sending a confirmation email, notification email and scheduling welcome email will be skipped."),id:"lists",label:e("Lists"),mode:"multiple",onChange:"SELECT_LISTS",onRefetch:"REFETCH_LISTS",options:[],path:"list_ids",placeholder:e("Select a status"),render:!0,value:void 0},{componentName:i.componentName.switch,helperText:e("Can be used to disable confirmation email. Otherwise, a confirmation email is sent as described above."),id:"send-confirmation-email",label:e("Send Confirmation Email"),onChange:"HANDLE_SEND_CONFIRMATION_EMAIL",path:"options.send_confirmation_email",render:!0,value:!0,wrapperClassName:"my-1"},{componentName:i.componentName.switch,helperText:e("Can be used to disable welcome email. Otherwise, a welcome email is scheduled as described above."),id:"schedule-welcome-email",label:e("Schedule Welcome Email"),onChange:"HANDLE_SCHEDULE_WELCOME_EMAIL",path:"options.schedule_welcome_email",render:!0,value:!0,wrapperClassName:"my-1"},{componentName:i.componentName.switch,helperText:e("Can be used to disable an admin notification email. Otherwise, an admin notification email is sent as described above."),id:"skip-subscriber-notification",label:e("Skip Subscriber Notification"),onChange:"HANDLE_SKIP_SUBSCRIBER_NOTIFICATION",path:"options.skip_subscriber_notification",render:!0,value:!1,wrapperClassName:"my-1"}]},actions:{HANDLE_FIELD_MAPPING:t("fieldMap"),HANDLE_SCHEDULE_WELCOME_EMAIL:t("options.schedule_welcome_email"),HANDLE_SEND_CONFIRMATION_EMAIL:t("options.send_confirmation_email"),HANDLE_SKIP_SUBSCRIBER_NOTIFICATION:t("options.skip_subscriber_notification"),SELECT_LISTS:t("list_ids"),ON_MACHINE_LOAD:async({$:a})=>{l(a,[{db:"fieldMap",id:"field-map"},{db:"list_ids",id:"lists"},{db:"options.send_confirmation_email",id:"send-confirmation-email"},{db:"options.schedule_welcome_email",id:"schedule-welcome-email"},{db:"options.skip_subscriber_notification",id:"skip-subscriber-notification"}]),await o(a),await n(a)},REFETCH_FIELDS:async({$:a})=>{await n(a)},REFETCH_LISTS:async({$:a})=>{await o(a)}}}));export{_ as default};
