import{aa as c,ab as l}from"./_applist-tangy-colts-beg-36.js";import{_ as n}from"./main-tangy-colts-beg.js";import{s as r}from"./machine.-tangy-colts-beg-869.js";import{f as t,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(s,e){return this.cache.has(s)?this.cache.get(s):(this.cache.set(s,e),e)}};const C=c(({helpers:s})=>({actions:{ON_MACHINE_LOAD:async({$:e})=>{r(e,[{db:"courseId",id:"course-id"},{db:"lessonId",id:"lesson-id"}]),await Promise.all([i(e),t(e)])},REFETCH_COURSES:async({$:e})=>i(e),SELECT_COURSE:async({$:e,e:o})=>{e.setThisComponent(a=>{a.value=o}),e.setDb({courseId:o})},REFETCH_LESSONS:async({$:e})=>t(e),SELECT_LESSON:async({$:e,e:o})=>{e.setThisComponent(a=>{a.value=o}),e.setDb(a=>{a.lessonId=o})}},states:{components:[{componentName:s.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:s.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:s.componentName.hookListener,fieldType:"config",id:"hook-listener",label:n("Listen Hook"),render:({$:e})=>{var o;return l((o=e.getComponent("course-id"))==null?void 0:o.value)}}]}}));export{C as default};
