import{aa as d,ab as c}from"./_applist-tangy-colts-beg-36.js";import{_ as e}from"./main-tangy-colts-beg.js";import{h as a,s as l}from"./machine.-tangy-colts-beg-869.js";import{h as N,a as r,c as E,u as m}from"./commonut-tangy-colts-beg-567.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(n,t){return this.cache.has(n)?this.cache.get(n):(this.cache.set(n,t),t)}};const T=d(({helpers:n})=>({states:{components:[E(n),{componentName:n.componentName.mixInput,helperText:e("Enter the title of the deal"),id:"title",label:e("Title"),onChange:"HANDLE_TITLE",path:"title",render:"IF_CONNECTION_SELECTED",value:void 0},{componentName:n.componentName.mixInput,helperText:e("Enter the description of the deal"),id:"description",label:e("Description"),onChange:"HANDLE_DESCRIPTION",path:"description",render:"IF_CONNECTION_SELECTED",value:void 0},{componentName:n.componentName.mixInput,helperText:e("Enter currency for the deal"),id:"currency",label:e("Currency"),onChange:"HANDLE_CURRENCY",path:"currency",render:"IF_CONNECTION_SELECTED",value:void 0},{componentName:n.componentName.mixInput,helperText:e("Enter value for the deal"),id:"value",label:e("Value"),onChange:"HANDLE_VALUE",path:"value",render:"IF_CONNECTION_SELECTED",value:void 0},{componentName:n.componentName.mixInput,helperText:e("Enter stage ID for the deal"),id:"stage",label:e("Stage"),onChange:"HANDLE_STAGE",path:"stage",render:"IF_CONNECTION_SELECTED",value:void 0},{componentName:n.componentName.mixInput,helperText:e("Enter owner ID for the deal"),id:"owner",label:e("Owner"),onChange:"HANDLE_OWNER",path:"owner",render:"IF_CONNECTION_SELECTED",value:void 0},{componentName:n.componentName.mixInput,helperText:e("Enter account ID for the deal"),id:"account-id",label:e("Account ID"),onChange:"HANDLE_ACCOUNT",path:"account",render:"IF_CONNECTION_SELECTED",value:void 0},{componentName:n.componentName.mixInput,helperText:e("Enter contact ID for the deal"),id:"contact-id",label:e("Contact ID"),onChange:"HANDLE_CONTACT",path:"contact",render:"IF_CONNECTION_SELECTED",value:void 0},{addItemButtonLabel:"Add Custom Fields",componentName:n.componentName.repeaterField,fieldsMetaData:[{componentName:n.componentName.input,label:e("Field Id"),name:"customFieldId",required:!0,value:void 0},{componentName:n.componentName.input,label:e("Field Value"),name:"fieldValue",required:!0,value:void 0},{componentName:n.componentName.input,label:e("Currency "),name:"fieldCurrency",value:void 0}],id:"fields",inputGroupProps:{label:e("Field #{COUNT}")},label:e("Custom Fields"),loading:!1,onChange:"SET_FIELDS",render:"IF_CONNECTION_SELECTED",value:[]}]},actions:{CONNECTION_ADD_CHANGE:r,IF_CONNECTION_SELECTED:({$:t})=>{var o;return c((o=t.getComponent("connection-id"))==null?void 0:o.value)},ON_MACHINE_LOAD:({$:t})=>{l(t,[{db:"connectionId",id:"connection-id"},{db:"urlDb",id:"url"},{db:"titleDb",id:"title"},{db:"descriptionDb",id:"description"},{db:"accountId",id:"account-id"},{db:"contactId",id:"contact-id"},{db:"ownerDb",id:"owner"},{db:"stageDb",id:"stage"},{db:"valueDb",id:"value"},{db:"fieldsDb",id:"fields"},{db:"currencyDb",id:"currency"}]),m({$:t})},SET_CONNECTION:async({$:t,e:o})=>{t.setThisComponent(i=>{i.value=o}),t.setDb(i=>{i.connectionId=o,i.urlDb=""})},HANDLE_ACCOUNT:a("accountId"),HANDLE_CONTACT:a("contactId"),HANDLE_CURRENCY:a("currencyDb"),HANDLE_DESCRIPTION:a("descriptionDb"),HANDLE_OWNER:a("ownerDb"),HANDLE_STAGE:a("stageDb"),HANDLE_TITLE:a("titleDb"),HANDLE_URL:N,HANDLE_VALUE:a("valueDb"),SET_FIELDS:a("fieldsDb")}}));export{T as default};
