import{aa as l,ab as r}from"./_applist-tangy-colts-beg-36.js";import{_ as e}from"./main-tangy-colts-beg.js";import{s as c}from"./machine.-tangy-colts-beg-869.js";import{h as a,a as d,c as s}from"./telegram-tangy-colts-beg-669.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(t,o){return this.cache.has(t)?this.cache.get(t):(this.cache.set(t,o),o)}};const E=l(({helpers:t})=>({states:{components:[s(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.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:"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:async({$:o,e:n})=>{o.setThisComponent(i=>{i.value=n}),o.setDb(i=>{i.connection=n})},IF_CONNECTION_SELECTED:({$:o})=>{var n;return r((n=o.getComponent("connection-id"))==null?void 0:n.value)},CONNECTION_ADD_CHANGE:d,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:async({$:o})=>{c(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"}])}}}));export{E as default};
