import{aa as c,ab as s}from"./_applist-tangy-colts-beg-36.js";import{aR as r,_ as n}from"./main-tangy-colts-beg.js";import{s as d}from"./machine.-tangy-colts-beg-869.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(o,e){return this.cache.has(o)?this.cache.get(o):(this.cache.set(o,e),e)}};const h=async()=>r("pro_piotnetaddonform/get",void 0,void 0,"GET");globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(o,e){return this.cache.has(o)?this.cache.get(o):(this.cache.set(o,e),e)}};const i=async o=>{o.setComponent("newRecordV2-id",t=>{t.loading=!0});const{data:e,status:a}=await h();if(a==="error"){o.setComponent("newRecordV2-id",t=>{o.util.isSelectComponent(t)&&(t.status=a,t.loading=!1,t.invalidMessage=e)}),console.error("Failed to fetch newRecordV2");return}o.setComponent("newRecordV2-id",t=>{o.util.isSelectComponent(t)&&(t.options=e,t.loading=!1,t.status=void 0)})};globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(o,e){return this.cache.has(o)?this.cache.get(o):(this.cache.set(o,e),e)}};const C=c(({helpers:o})=>({actions:{ON_MACHINE_LOAD:async({$:e})=>{d(e,[{db:"newRecordV2Id",id:"newRecordV2-id"}]),await i(e)},REFETCH_NEWRECORDV2S:async({$:e})=>i(e),SELECT_NEWRECORDV2:async({$:e,e:a})=>{e.setThisComponent(t=>{t.value=a}),e.setDb({newRecordV2Id:a})}},states:{components:[{componentName:o.componentName.select,fieldType:"config",id:"newRecordV2-id",label:n("NewRecordV2s"),onChange:"SELECT_NEWRECORDV2",onRefetch:"REFETCH_NEWRECORDV2S",options:[],placeholder:n("Select a newRecordV2"),render:!0,value:void 0},{componentName:o.componentName.hookListener,fieldType:"config",id:"hook-listener",label:n("Listen Hook"),render:({$:e})=>{var a;return s((a=e.getComponent("newRecordV2-id"))==null?void 0:a.value)}}]}}));export{C as default};
