import{aa as i,ab as m}from"./_applist-tangy-colts-beg-36.js";import{_ as a}from"./main-tangy-colts-beg.js";import{s as r}from"./machine.-tangy-colts-beg-869.js";import{h as o,a as c,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 C=i(({helpers:e})=>({states:{components:[p(e),{componentName:e.componentName.mixInput,helperText:a("Enter the name of the product, which is visible to the customer"),id:"name",label:a("Name"),onChange:"HANDLE_NAME",path:"name",render:"IF_CONNECTION_SELECTED",required:!0,value:void 0},{componentName:e.componentName.mixInput,helperText:a("Enter the description of the product"),id:"description",label:a("Description"),onChange:"HANDLE_DESCRIPTION",path:"description",render:"IF_CONNECTION_SELECTED",value:void 0},{componentName:e.componentName.select,id:"type",label:a("Type"),onChange:"HANDLE_TYPE",options:[{label:a("Service"),value:"service"},{label:a("Good"),value:"good"}],path:"type",render:"IF_CONNECTION_SELECTED",value:"service"},{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 m((n=t.getComponent("connection-id"))==null?void 0:n.value)},CONNECTION_ADD_CHANGE:c,HANDLE_DESCRIPTION:o("descriptionDb"),HANDLE_META_DATA:o("metaDataFieldProperties"),HANDLE_NAME:o("nameDb"),HANDLE_TYPE:o("typeDb"),SET_CONNECTION:o("connectionId"),ON_MACHINE_LOAD:async({$:t})=>{r(t,[{db:"connectionId",id:"connection-id"},{db:"nameDb",id:"name"},{db:"metaDataFieldProperties",id:"metaData-field-properties"},{db:"typeDb",id:"type"},{db:"descriptionDb",id:"description"}])}}}));export{C as default};
