import{aa as l,ab as c}from"./_applist-tangy-colts-beg-36.js";import{_ as e}from"./main-tangy-colts-beg.js";import{h as t,s as h}from"./machine.-tangy-colts-beg-869.js";import{h as r,b as i,c as C,d as s}from"./machineh-tangy-colts-beg-816.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(a,n){return this.cache.has(a)?this.cache.get(a):(this.cache.set(a,n),n)}};const d=l(({helpers:a})=>({states:{components:[C(a),{componentName:a.componentName.mixInput,helperText:e("Enter the channel name or ID to search for."),id:"search-query",label:e("Search Query"),onChange:"SET_SEARCH_QUERY",path:"search_query",render:"IF_CONNECTION_SELECTED",required:!0,value:[]},{allowClear:!0,componentName:a.componentName.select,helperText:e("Select the type of channel to filter by (optional)."),id:"channel-type",label:e("Channel Type"),onChange:"SET_CHANNEL_TYPE",options:[{label:e("All Types"),value:""},{label:e("Text Channel"),value:"0"},{label:e("Voice Channel"),value:"2"},{label:e("Category"),value:"4"},{label:e("Announcement Channel"),value:"5"},{label:e("Stage Channel"),value:"13"},{label:e("Forum Channel"),value:"15"}],path:"channel_type",render:"IF_CONNECTION_SELECTED",required:!1,value:""}]},actions:{SET_CONNECTION:({$:n,e:o})=>{t("connectionId")({$:n,e:o}),s(n,a)},CONNECTION_ADD_CHANGE:i,HANDLE_BOT_TOKEN:r,SET_CHANNEL_TYPE:t("channelType"),SET_SEARCH_QUERY:t("searchQuery"),IF_CONNECTION_SELECTED:({$:n})=>{var o;return c((o=n.getComponent("connection-id"))==null?void 0:o.value)},ON_MACHINE_LOAD:({$:n})=>{h(n,[{db:"connectionId",id:"connection-id"},{db:"channelType",id:"channel-type"},{db:"searchQuery",id:"search-query"}])}}}));export{d as default};
