import{aa as s,ab as m}from"./_applist-tangy-colts-beg-36.js";import{_ as n}from"./main-tangy-colts-beg.js";import{s as h}from"./machine.-tangy-colts-beg-869.js";import{f as i,a as c}from"./machineh-tangy-colts-beg-615.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(t,e){return this.cache.has(t)?this.cache.get(t):(this.cache.set(t,e),e)}};const T=s(({helpers:t})=>({actions:{ON_MACHINE_LOAD:async({$:e})=>{h(e,[{db:"achievementType",id:"achievement-type"},{db:"awardId",id:"award-id"}]),await Promise.all([c(e),i(e)])},REFETCH_ACHIEVEMENT_TYPES:async({$:e})=>c(e),SELECT_ACHIEVEMENT_TYPE:async({$:e,e:a})=>{e.setThisComponent(o=>{o.value=a}),e.setDb({achievementType:a})},REFETCH_AWARDS:async({$:e})=>i(e),SELECT_AWARD:async({$:e,e:a})=>{e.setThisComponent(o=>{o.value=a}),e.setDb(o=>{o.awardId=a})}},states:{components:[{componentName:t.componentName.select,fieldType:"config",id:"achievement-type",label:n("Achievement types"),onChange:"SELECT_ACHIEVEMENT_TYPE",onRefetch:"REFETCH_ACHIEVEMENT_TYPES",options:[],placeholder:n("Select a achievement-type"),render:!0,value:void 0},{componentName:t.componentName.select,fieldType:"config",id:"award-id",label:n("Achievement"),mode:"multiple",onChange:"SELECT_AWARD",onRefetch:"REFETCH_AWARDS",optionFilterProp:"label",options:[],placeholder:n("any achievement"),render:!0,showSearch:!0,value:void 0},{componentName:t.componentName.hookListener,fieldType:"config",id:"hook-listener",label:n("Listen Hook"),render:({$:e})=>{var a;return m((a=e.getComponent("achievement-type"))==null?void 0:a.value)}}]}}));export{T as default};
