import{aa as o,ab as m}from"./_applist-tangy-colts-beg-36.js";import{_ as a}from"./main-tangy-colts-beg.js";import{h as n,s as r}from"./machine.-tangy-colts-beg-869.js";import{h as s,c}from"./emailitc-tangy-colts-beg-514.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,t){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,t),t)}};const T=o(({helpers:e})=>({states:{components:[c(e),{componentName:e.componentName.mixInput,fieldType:"config",helperText:a("Enter the token ID here. To obtain your Token ID, go to “Audiences” → “Subscribe URL” and use the value after the last slash in the URL (for example, in http://api.emailit.com/v1/audiences/subscribe/718b79........., the Token ID is 718b79.........)."),id:"token-id",label:a("Audience Token ID"),onChange:"SET_TOKEN_ID",path:"token-id",render:"IF_CONNECTION_SELECTED",required:!0,value:[]},{componentName:e.componentName.mixInput,helperText:a("Enter the subscriber's email address."),id:"email",label:a("Email"),onChange:"SET_EMAIL",path:"email",render:"IF_CONNECTION_SELECTED",required:!0,value:[]},{componentName:e.componentName.mixInput,helperText:a("Enter the subscriber's first name."),id:"first-name",label:a("First Name"),onChange:"SET_FIRST_NAME",path:"first_name",render:"IF_CONNECTION_SELECTED",required:!1,value:[]},{componentName:e.componentName.mixInput,helperText:a("Enter the subscriber's last name."),id:"last-name",label:a("Last Name"),onChange:"SET_LAST_NAME",path:"last_name",render:"IF_CONNECTION_SELECTED",required:!1,value:[]}]},actions:{CONNECTION_ADD_CHANGE:s,IF_CONNECTION_SELECTED:({$:t})=>{var i;return m((i=t.getComponent("connection-id"))==null?void 0:i.value)},SET_CONNECTION:n("connectionId"),SET_EMAIL:n("email"),SET_FIRST_NAME:n("firstName"),SET_LAST_NAME:n("lastName"),SET_TOKEN_ID:n("tokenId"),ON_MACHINE_LOAD:({$:t})=>{r(t,[{db:"connectionId",id:"connection-id"},{db:"tokenId",id:"token-id"},{db:"email",id:"email"},{db:"firstName",id:"first-name"},{db:"lastName",id:"last-name"}])}}}));export{T as default};
