import{aa as c,ab as r}from"./_applist-tangy-colts-beg-36.js";import{_ as e}from"./main-tangy-colts-beg.js";import{s}from"./machine.-tangy-colts-beg-869.js";import{h as a,a as l,c as C}from"./telegram-tangy-colts-beg-669.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(t,n){return this.cache.has(t)?this.cache.get(t):(this.cache.set(t,n),n)}};const E=c(({helpers:t})=>({states:{components:[C(t),{componentName:t.componentName.mixInput,helperText:e("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:e("Chat ID"),onChange:"SET_CHAT_ID",path:"chat_id",render:"IF_CONNECTION_SELECTED",required:!0,value:[]},{componentName:t.componentName.mixInput,id:"contact-id",label:e("Contact Phone Number"),onChange:"SET_CONTACT",path:"phone_number",render:"IF_CONNECTION_SELECTED",required:!0,value:[]},{componentName:t.componentName.mixInput,id:"first-name-id",label:e("Contact First Name"),onChange:"SET_FIRST_NAME",path:"first_name",render:"IF_CONNECTION_SELECTED",required:!0,value:[]},{componentName:t.componentName.mixInput,id:"last-name-id",label:e("Contact Last Name"),onChange:"SET_LAST_NAME",path:"last_name",render:"IF_CONNECTION_SELECTED",required:!0,value:[]},{componentName:t.componentName.select,helperText:e("Choose yes to send the message silently. Users will receive a notification with no sound."),id:"notifications-id",label:e("Disable Notifications"),onChange:"SET_NOTIFICATIONS",options:[{label:e("Yes"),value:"true"},{label:e("No"),value:"false"}],path:"disable_notification",placeholder:e("Choose to disable notification"),render:"IF_CONNECTION_SELECTED",value:"false"},{componentName:t.componentName.select,helperText:e("Choose yes if you want to protects the contents of the sent message from forwarding and saving."),id:"protect-id",label:e("Protect Content?"),onChange:"SET_PROTECT_CONTENT",options:[{label:e("Yes"),value:"true"},{label:e("No"),value:"false"}],path:"protect_content",placeholder:e("Choose Protect Content"),render:"IF_CONNECTION_SELECTED",value:"false"}]},actions:{SET_CONNECTION:async({$:n,e:o})=>{n.setThisComponent(i=>{i.value=o}),n.setDb(i=>{i.connection=o})},IF_CONNECTION_SELECTED:({$:n})=>{var o;return r((o=n.getComponent("connection-id"))==null?void 0:o.value)},CONNECTION_ADD_CHANGE:l,SET_CHAT_ID:a("chat"),SET_CONTACT:a("contact"),SET_FIRST_NAME:a("fristName"),SET_LAST_NAME:a("lastName"),SET_NOTIFICATIONS:a("notifications"),SET_PROTECT_CONTENT:a("protectContent"),ON_MACHINE_LOAD:async({$:n})=>{s(n,[{db:"connection",id:"connection-id"},{db:"chat",id:"chat-id"},{db:"contact",id:"contact-id"},{db:"fristName",id:"first-name-id"},{db:"lastName",id:"last-name-id"},{db:"notifications",id:"notifications-id"},{db:"protectContent",id:"protect-id"}])}}}));export{E as default};
