import{aa as l,ab as d}from"./_applist-tangy-colts-beg-36.js";import{_ as n}from"./main-tangy-colts-beg.js";import{s as p}from"./machine.-tangy-colts-beg-869.js";import{d as a,f as c,a as i}from"./machineh-tangy-colts-beg-425.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=l(({helpers:t})=>({actions:{ON_MACHINE_LOAD:async({$:e})=>{p(e,[{db:"courseId",id:"course-id"},{db:"lessonId",id:"lesson-id"},{db:"topicId",id:"topic-id"}]),await Promise.all([i(e),c,a(e)])},REFETCH_COURSES:async({$:e})=>i(e),SELECT_COURSE:async({$:e,e:o})=>{e.setThisComponent(s=>{s.value=o}),e.setDb({courseId:o})},REFETCH_LESSONS:async({$:e})=>c(e),SELECT_LESSON:async({$:e,e:o})=>{e.setThisComponent(s=>{s.value=o}),e.setDb(s=>{s.lessonId=o})},REFETCH_TOPICS:async({$:e})=>a(e),SELECT_TOPIC:async({$:e,e:o})=>{e.setThisComponent(s=>{s.value=o}),e.setDb(s=>{s.topicId=o})}},states:{components:[{componentName:t.componentName.select,fieldType:"config",id:"course-id",label:n("Courses"),onChange:"SELECT_COURSE",onRefetch:"REFETCH_COURSES",options:[],placeholder:n("Select a course"),render:!0,value:void 0},{componentName:t.componentName.select,fieldType:"config",id:"lesson-id",label:n("Lessons"),onChange:"SELECT_LESSON",onRefetch:"REFETCH_LESSONS",options:[],placeholder:n("Select a Lesson"),render:!0,value:void 0},{componentName:t.componentName.select,fieldType:"config",id:"topic-id",label:n("Topics"),onChange:"SELECT_TOPIC",onRefetch:"REFETCH_TOPICS",options:[],placeholder:n("Select a Topic"),render:!0,value:void 0},{componentName:t.componentName.hookListener,fieldType:"config",id:"hook-listener",label:n("Listen Hook"),render:({$:e})=>{var o;return d((o=e.getComponent("topic-id"))==null?void 0:o.value)}}]}}));export{T as default};
