import{aa as r,ab as i}from"./_applist-tangy-colts-beg-36.js";import{_ as t}from"./main-tangy-colts-beg.js";import{s as m}from"./machine.-tangy-colts-beg-869.js";import{h as a,a as c,c as N}from"./commonut-tangy-colts-beg-867.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,n){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,n),n)}};const C=r(({helpers:e})=>({states:{components:[N(e),{componentName:e.componentName.mixInput,helperText:t("Enter the amount for the PaymentIntent as a numeric value in the smallest unit of the currency. For example, for USD, enter 1000 to represent $10.00."),id:"amount",label:t("Amount"),onChange:"HANDLE_AMOUNT",path:"amount",render:"IF_CONNECTION_SELECTED",required:!0,value:void 0},{componentName:e.componentName.mixInput,helperText:t("Enter the currency for the PaymentIntent using a 3-letter ISO code, e.g., usd, inr etc."),id:"currency",label:t("Currency"),onChange:"HANDLE_CURRENCY",path:"currency",render:"IF_CONNECTION_SELECTED",required:!0,value:void 0},{componentName:e.componentName.mixInput,helperText:t("Enter the customer ID of the payment-intent"),id:"customer-id",label:t("Customer ID"),onChange:"HANDLE_CUSTOMER",path:"customer",render:"IF_CONNECTION_SELECTED",value:void 0},{componentName:e.componentName.mixInput,helperText:t("Enter the description of the payment-intent"),id:"description",label:t("Description"),onChange:"HANDLE_DESCRIPTION",path:"description",render:"IF_CONNECTION_SELECTED",value:void 0},{addItemButtonLabel:"Metadata",componentName:e.componentName.repeaterField,fieldsMetaData:[{componentName:e.componentName.mixInput,label:t("Key"),name:"key",value:[],wrapperClassName:"w-100"},{componentName:e.componentName.mixInput,label:t("Value"),name:"value",value:[],wrapperClassName:"w-100"}],id:"metaData-field-properties",label:t("Meta Data"),onChange:"HANDLE_META_DATA",path:"metaDataFieldProperties",render:"IF_CONNECTION_SELECTED",value:[]}]},actions:{IF_CONNECTION_SELECTED:({$:n})=>{var o;return i((o=n.getComponent("connection-id"))==null?void 0:o.value)},CONNECTION_ADD_CHANGE:c,HANDLE_AMOUNT:a("amountDb"),HANDLE_CURRENCY:a("currencyDb"),HANDLE_CUSTOMER:a("customerId"),HANDLE_DESCRIPTION:a("descriptionDb"),HANDLE_META_DATA:a("metaDataFieldProperties"),SET_CONNECTION:a("connectionId"),ON_MACHINE_LOAD:async({$:n})=>{m(n,[{db:"connectionId",id:"connection-id"},{db:"customerId",id:"customer-id"},{db:"currencyDb",id:"currency"},{db:"descriptionDb",id:"description"},{db:"metaDataFieldProperties",id:"metaData-field-properties"},{db:"amountDb",id:"amount"}])}}}));export{C as default};
