import{b as r,i as c}from"./useflows-BpG3C9m1.js";import{e}from"./main-few-lands-burn.js";import{s as d}from"./machine.-BRuqPpdF.js";import{h as s,f as i,a,c as p}from"./telegram-Cgmg4C_6.js";import"./mutative-C6xjlr6O.js";import"./lodash-YpNkAOPN.js";const u=r(({helpers:t})=>({states:{components:[p(t),{componentName:t.componentName.select,fieldType:"config",id:"chose-media",label:e("Chose Media Type"),onChange:"SET_MEDIA",options:[{label:e("Photo"),value:"photo"},{label:e("Audio"),value:"audio"},{label:e("Document"),value:"document"},{label:e("Video"),value:"video"}],path:"media",placeholder:e("Select Media Type"),render:"IF_CONNECTION_SELECTED",required:!0,value:"photo"},{componentName:t.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:t.componentName.mixInput,id:"url-id",label:e("File URL"),onChange:"SET_URL",path:"url",render:"IF_CONNECTION_SELECTED",required:!0,value:[]},{componentName:t.componentName.mixInput,helperText:e("Enter the caption."),id:"caption-id",label:e("Caption Text"),onChange:"SET_CAPTION",path:"caption",render:"IF_CONNECTION_SELECTED",required:!0,value:[]},{componentName:t.componentName.select,helperText:e("Select Markdown-style or HTML-style of the text, if you want Telegram apps to show bold, italic, fixed-width text or inline URLs in your bots message."),id:"parse-id",label:e("Caption Text Format"),onChange:"SET_PARSE_MODE",options:[{label:e("HTML"),value:"HTML"},{label:e("Markdown"),value:"MarkdownV2"}],path:"parse_mode",placeholder:e("Select a Format"),render:"IF_CONNECTION_SELECTED",required:!0,value:"HTML"},{componentName:t.componentName.select,helperText:e("Choose if to send the message silently. iOS users will not receive a notification,Android users will receive  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:({$:o,e:l})=>{o.setThisComponent(n=>{n.value=l}),o.setDb(n=>{n.connection=l}),i(o)},IF_CONNECTION_SELECTED:({$:o})=>c(o.getComponent("connection-id")?.value),CONNECTION_ADD_CHANGE:s,REFETCH_CHATS:({$:o})=>i(o),SET_MEDIA:a("media"),SET_CHAT_ID:a("chat"),SET_URL:a("url"),SET_CAPTION:a("caption"),SET_PARSE_MODE:a("parse"),SET_NOTIFICATIONS:a("notifications"),SET_PROTECT_CONTENT:a("protect"),ON_MACHINE_LOAD:({$:o})=>{d(o,[{db:"connection",id:"connection-id"},{db:"media",id:"chose-media"},{db:"chat",id:"chat-id"},{db:"url",id:"url-id"},{db:"caption",id:"caption-id"},{db:"parse",id:"parse-id"},{db:"notifications",id:"notifications-id"},{db:"protect",id:"protect-id"}]),i(o)}}}));export{u as default};
