import{aa as r,ab as h}from"./_applist-tangy-colts-beg-36.js";import{_ as o}from"./main-tangy-colts-beg.js";import{s as c}from"./machine.-tangy-colts-beg-869.js";import{h as i,a as s,c as m}from"./telegram-tangy-colts-beg-669.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(t,e){return this.cache.has(t)?this.cache.get(t):(this.cache.set(t,e),e)}};const E=r(({helpers:t})=>({states:{components:[m(t),{componentName:t.componentName.mixInput,helperText:o("Enter the Chat ID with the prefix 100 here. For example, if your channel ID is -155545555, then the chat ID will be -100155545555 or the username of the target channel (in the format @channelusername or @supergroupusername)."),id:"chat-id",label:o("Chat ID"),onChange:"SET_CHAT_ID",path:"chat_id",render:"IF_CONNECTION_SELECTED",required:!0,value:[]},{componentName:t.componentName.mixInput,id:"user-id",label:o("User ID"),onChange:"SET_USER_ID",path:"user_id",render:"IF_CONNECTION_SELECTED",required:!0,value:[]}]},actions:{SET_CONNECTION:async({$:e,e:n})=>{e.setThisComponent(a=>{a.value=n}),e.setDb(a=>{a.connection=n})},IF_CONNECTION_SELECTED:({$:e})=>{var n;return h((n=e.getComponent("connection-id"))==null?void 0:n.value)},CONNECTION_ADD_CHANGE:s,SET_CHAT_ID:i("chat"),SET_USER_ID:i("user"),SET_UNTIL:i("untilDate"),ON_MACHINE_LOAD:async({$:e})=>{c(e,[{db:"connection",id:"connection-id"},{db:"chat",id:"chat-id"},{db:"user",id:"user-id"},{db:"untilDate",id:"ban-until-id"}])}}}));export{E as default};
