import{b as s,i as r}from"./useflows-BpG3C9m1.js";import{e}from"./main-few-lands-burn.js";import{s as l}from"./machine.-BRuqPpdF.js";import{h as C,f as i,a as o,c as N}from"./telegram-Cgmg4C_6.js";import"./mutative-C6xjlr6O.js";import"./lodash-YpNkAOPN.js";const p=s(({helpers:n})=>({states:{components:[N(n),{componentName:n.componentName.select,helperText:e("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:e("Select Chat"),onChange:"SET_CHAT_ID",onRefetch:"REFETCH_CHATS",options:[],path:"chat_id",placeholder:e("Select a chat"),render:"IF_CONNECTION_SELECTED",required:!0,showSearch:!0,value:void 0},{componentName:n.componentName.mixInput,id:"contact-id",label:e("Contact Phone Number"),onChange:"SET_CONTACT",path:"phone_number",render:"IF_CONNECTION_SELECTED",required:!0,value:[]},{componentName:n.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:n.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:n.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:n.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:({$:t,e:c})=>{t.setThisComponent(a=>{a.value=c}),t.setDb(a=>{a.connection=c}),i(t)},IF_CONNECTION_SELECTED:({$:t})=>r(t.getComponent("connection-id")?.value),CONNECTION_ADD_CHANGE:C,REFETCH_CHATS:({$:t})=>i(t),SET_CHAT_ID:o("chat"),SET_CONTACT:o("contact"),SET_FIRST_NAME:o("fristName"),SET_LAST_NAME:o("lastName"),SET_NOTIFICATIONS:o("notifications"),SET_PROTECT_CONTENT:o("protectContent"),ON_MACHINE_LOAD:({$:t})=>{l(t,[{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"}]),i(t)}}}));export{p as default};
