import{aa as c,ab as s}from"./_applist-tangy-colts-beg-36.js";import{_ as o}from"./main-tangy-colts-beg.js";import{h as t,s as E}from"./machine.-tangy-colts-beg-869.js";import{e as i,h as d,b as h,c as C,d as l}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 p=c(({helpers:n})=>({states:{components:[C(n),{allowClear:!0,componentName:n.componentName.select,fieldType:"config",helperText:o("Select the channel where the message is located."),id:"channel-id",label:o("Select Channel"),onChange:"SELECT_CHANNEL",onRefetch:"REFETCH_CHANNELS",options:[],render:"IF_CONNECTION_SELECTED",required:!0,value:void 0},{componentName:n.componentName.mixInput,helperText:o("Enter the ID of the message you want to delete."),id:"message-id",label:o("Message ID"),onChange:"SET_MESSAGE_ID",path:"message_id",render:"IF_CHANNEL_SELECTED",required:!0,value:[]}]},actions:{SET_CONNECTION:async({$:e,e:a})=>{t("connectionId")({$:e,e:a}),await i(e),l(e,n)},CONNECTION_ADD_CHANGE:h,HANDLE_BOT_TOKEN:d,SELECT_CHANNEL:t("channelId"),REFETCH_CHANNELS:({$:e})=>i(e),SET_MESSAGE_ID:t("messageId"),IF_CHANNEL_SELECTED:({$:e})=>{var a;return s((a=e.getComponent("channel-id"))==null?void 0:a.value)},IF_CONNECTION_SELECTED:({$:e})=>{var a;return s((a=e.getComponent("connection-id"))==null?void 0:a.value)},ON_MACHINE_LOAD:({$:e})=>{E(e,[{db:"connectionId",id:"connection-id"},{db:"channelId",id:"channel-id"},{db:"messageId",id:"message-id"}]),i(e)}}}));export{p as default};
