import{aa as i,ab as l}from"./_applist-tangy-colts-beg-36.js";import{_ as t}from"./main-tangy-colts-beg.js";import{s}from"./machine.-tangy-colts-beg-869.js";import{f as o}from"./machineh-tangy-colts-beg-552.js";import{h,a as c,c as C}from"./slackcom-tangy-colts-beg-679.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(a,e){return this.cache.has(a)?this.cache.get(a):(this.cache.set(a,e),e)}};const p=i(({helpers:a})=>({states:{components:[C(a),{componentName:a.componentName.select,id:"channel-id",isLoadable:!0,label:t("Channel"),onChange:"SET_CHANNEL",onLoadData:"ON_LOAD_CHANNEL_DATA",onRefetch:"REFETCH_CHANNEL",optionFilterProp:"label",options:[],path:"channel",placeholder:t("Select a Channel"),render:"IF_CONNECTION_SELECTED",required:!0,showSearch:!0,value:void 0}]},actions:{SET_CONNECTION:async({$:e,e:n})=>{c("connection")({$:e,e:n}),await o(e)},IF_CONNECTION_SELECTED:({$:e})=>{var n;return l((n=e.getComponent("connection-id"))==null?void 0:n.value)},REFETCH_CHANNEL:async({$:e})=>{await o(e),e.setComponent("channel-id",n=>{e.util.isSelectComponent(n)&&(n.isLoadable=!0)})},ON_LOAD_CHANNEL_DATA:({$:e,e:n})=>o(e,n.count),SET_CHANNEL:c("channel"),CONNECTION_ADD_CHANGE:h,ON_MACHINE_LOAD:async({$:e})=>{var n;s(e,[{db:"connection",id:"connection-id"},{db:"channel",id:"channel-id"}]),(n=e.db)!=null&&n.connection&&await o(e)}}}));export{p as default};
