import{b as r,i as h}from"./useflows-BpG3C9m1.js";import{e as n}from"./main-few-lands-burn.js";import{s as l}from"./machine.-BRuqPpdF.js";import{h as C,f as a,a as c,c as m}from"./telegram-Cgmg4C_6.js";import"./mutative-C6xjlr6O.js";import"./lodash-YpNkAOPN.js";const T=r(({helpers:t})=>({states:{components:[m(t),{componentName:t.componentName.select,helperText:n("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:n("Select Chat"),onChange:"SET_CHAT_ID",onRefetch:"REFETCH_CHATS",options:[],path:"chat_id",placeholder:n("Select a chat"),render:"IF_CONNECTION_SELECTED",required:!0,showSearch:!0,value:void 0},{componentName:t.componentName.mixInput,helperText:n("The invite link to revoke."),id:"link-id",label:n("Invite Link"),onChange:"SET_LINK",path:"invite_link",render:"IF_CONNECTION_SELECTED",required:!0,value:[]}]},actions:{SET_CONNECTION:({$:e,e:i})=>{e.setThisComponent(o=>{o.value=i}),e.setDb(o=>{o.connection=i}),a(e)},IF_CONNECTION_SELECTED:({$:e})=>h(e.getComponent("connection-id")?.value),CONNECTION_ADD_CHANGE:C,REFETCH_CHATS:({$:e})=>a(e),SET_CHAT_ID:c("chat"),SET_LINK:c("link"),ON_MACHINE_LOAD:({$:e})=>{l(e,[{db:"connection",id:"connection-id"},{db:"chat",id:"chat-id"},{db:"link",id:"link-id"}]),a(e)}}}));export{T as default};
