import{aa as i,ab as r}from"./_applist-tangy-colts-beg-36.js";import{_ as a}from"./main-tangy-colts-beg.js";import{s as c}from"./machine.-tangy-colts-beg-869.js";import{h as o,a as m,c as p}from"./commonut-tangy-colts-beg-867.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 E=i(({helpers:e})=>({states:{components:[p(e),{componentName:e.componentName.mixInput,helperText:a("Enter the customer ID for creating subscription"),id:"customer-id",label:a("Customer ID"),onChange:"HANDLE_CUSTOMER",path:"customer_id",render:"IF_CONNECTION_SELECTED",required:!0,value:void 0},{componentName:e.componentName.mixInput,helperText:a("Enter the price ID for creating subscription"),id:"price",label:a("Price"),onChange:"HANDLE_PRICE",path:"price_id",render:"IF_CONNECTION_SELECTED",value:void 0},{addItemButtonLabel:"Metadata",componentName:e.componentName.repeaterField,fieldsMetaData:[{componentName:e.componentName.mixInput,label:a("Key"),name:"key",value:[],wrapperClassName:"w-100"},{componentName:e.componentName.mixInput,label:a("Value"),name:"value",value:[],wrapperClassName:"w-100"}],id:"metaData-field-properties",label:a("Meta Data"),onChange:"HANDLE_META_DATA",path:"metaDataFieldProperties",render:"IF_CONNECTION_SELECTED",value:[]}]},actions:{IF_CONNECTION_SELECTED:({$:t})=>{var n;return r((n=t.getComponent("connection-id"))==null?void 0:n.value)},CONNECTION_ADD_CHANGE:m,HANDLE_CUSTOMER:o("customerId"),HANDLE_META_DATA:o("metaDataFieldProperties"),HANDLE_PRICE:o("priceDb"),SET_CONNECTION:o("connectionId"),ON_MACHINE_LOAD:async({$:t})=>{c(t,[{db:"connectionId",id:"connection-id"},{db:"customerId",id:"customer-id"},{db:"metaDataFieldProperties",id:"metaData-field-properties"},{db:"priceDb",id:"price"}])}}}));export{E as default};
