import{aa as c,ab as E}from"./_applist-tangy-colts-beg-36.js";import{_ as o}from"./main-tangy-colts-beg.js";import{h as a,s as i}from"./machine.-tangy-colts-beg-869.js";import{a as s,h as r,b as d,c as C,d as m}from"./machineh-tangy-colts-beg-816.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 u=c(({helpers:n})=>({states:{components:[C(n),{allowClear:!0,componentName:n.componentName.select,fieldType:"config",helperText:o("Select the user you want to send a direct message to."),id:"user-id",label:o("Select User"),onChange:"SELECT_USER",onRefetch:"REFETCH_MEMBERS",options:[],render:"IF_CONNECTION_SELECTED",required:!0,value:void 0},{componentName:n.componentName.mixInput,helperText:o("Enter the message content you want to send."),id:"message-content",label:o("Message Content"),onChange:"SET_MESSAGE_CONTENT",path:"content",render:"IF_USER_SELECTED",required:!0,value:[]}]},actions:{SET_CONNECTION:({$:e,e:t})=>{a("connectionId")({$:e,e:t}),s(e),m(e,n)},CONNECTION_ADD_CHANGE:d,HANDLE_BOT_TOKEN:r,SELECT_USER:a("userId"),REFETCH_MEMBERS:({$:e})=>s(e),SET_MESSAGE_CONTENT:a("messageContent"),IF_CONNECTION_SELECTED:({$:e})=>{var t;return E((t=e.getComponent("connection-id"))==null?void 0:t.value)},IF_USER_SELECTED:({$:e})=>{var t;return E((t=e.getComponent("user-id"))==null?void 0:t.value)},ON_MACHINE_LOAD:({$:e})=>{i(e,[{db:"connectionId",id:"connection-id"},{db:"userId",id:"user-id"},{db:"messageContent",id:"message-content"}]),s(e)}}}));export{u as default};
