import{aa as r,ab as c}from"./_applist-tangy-colts-beg-36.js";import{_ as t}from"./main-tangy-colts-beg.js";import{s as l}from"./machine.-tangy-colts-beg-869.js";import{b as i,c as s}from"./machineh-tangy-colts-beg-615.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(n,e){return this.cache.has(n)?this.cache.get(n):(this.cache.set(n,e),e)}};const E=r(({helpers:n})=>({actions:{ON_MACHINE_LOAD:async({$:e})=>{l(e,[{db:"rankType",id:"rank-type"},{db:"rankId",id:"rank-id"}]),await Promise.all([s(e),i(e)])},REFETCH_RANK_TYPES:async({$:e})=>s(e),REFETCH_RANKS:async({$:e})=>i(e),SELECT_RANK:async({$:e,e:o})=>{e.setThisComponent(a=>{a.value=o}),e.setDb(a=>{a.rankId=o})},SELECT_RANK_TYPE:async({$:e,e:o})=>{e.setThisComponent(a=>{a.value=o}),e.setDb(a=>{a.rankType=o}),e.setComponent("rank-id",a=>{a.value=void 0}),await i(e)}},states:{components:[{componentName:n.componentName.select,fieldType:"config",id:"rank-type",label:t("Rank Type"),onChange:"SELECT_RANK_TYPE",onRefetch:"REFETCH_RANK_TYPES",options:[],placeholder:t("Select a rank type"),render:!0,value:void 0},{componentName:n.componentName.select,fieldType:"config",id:"rank-id",label:t("Ranks"),onChange:"SELECT_RANK",onRefetch:"REFETCH_RANKS",optionFilterProp:"label",options:[],placeholder:t("any rank"),render:!0,showSearch:!0,value:void 0},{componentName:n.componentName.hookListener,fieldType:"config",id:"hook-listener",label:t("Listen Hook"),render:({$:e})=>{var o;return c((o=e.getComponent("rank-id"))==null?void 0:o.value)}}]}}));export{E as default};
