import{b as c,i as s}from"./useflows-BpG3C9m1.js";import{e as t}from"./main-few-lands-burn.js";import{s as C}from"./machine.-BRuqPpdF.js";import{h,f as o,a as i,c as m}from"./telegram-Cgmg4C_6.js";import"./mutative-C6xjlr6O.js";import"./lodash-YpNkAOPN.js";const p=c(({helpers:n})=>({states:{components:[m(n),{componentName:n.componentName.select,helperText:t("Select the target chat fetched from your bot, or map a Chat ID. Use the prefix 100 for channels (e.g. channel ID -155545555 becomes -100155545555) or a username like @channelusername."),id:"chat-id",isMappable:!0,label:t("Select Chat"),onChange:"SET_CHAT_ID",onRefetch:"REFETCH_CHATS",options:[],path:"chat_id",placeholder:t("Select a chat"),render:"IF_CONNECTION_SELECTED",required:!0,showSearch:!0,value:void 0},{componentName:n.componentName.mixInput,id:"user-id",label:t("User ID"),onChange:"SET_USER_ID",path:"user_id",render:"IF_CONNECTION_SELECTED",required:!0,value:[]}]},actions:{SET_CONNECTION:({$:e,e:r})=>{e.setThisComponent(a=>{a.value=r}),e.setDb(a=>{a.connection=r}),o(e)},IF_CONNECTION_SELECTED:({$:e})=>s(e.getComponent("connection-id")?.value),CONNECTION_ADD_CHANGE:h,REFETCH_CHATS:({$:e})=>o(e),SET_CHAT_ID:i("chat"),SET_USER_ID:i("user"),SET_UNTIL:i("untilDate"),ON_MACHINE_LOAD:({$:e})=>{C(e,[{db:"connection",id:"connection-id"},{db:"chat",id:"chat-id"},{db:"user",id:"user-id"},{db:"untilDate",id:"ban-until-id"}]),o(e)}}}));export{p as default};
