import{aa as i,ab as c}from"./_applist-tangy-colts-beg-36.js";import{_ as t}from"./main-tangy-colts-beg.js";import{s as m}from"./machine.-tangy-colts-beg-869.js";import{h as o,a as N,b as E,c as r,d,r as p}from"./whatsapp-tangy-colts-beg-275.js";import"./lodash-tangy-colts-beg-516.js";globalThis.jotaiAtomCache=globalThis.jotaiAtomCache||{cache:new Map,get(e,n){return this.cache.has(e)?this.cache.get(e):(this.cache.set(e,n),n)}};const s=i(({helpers:e})=>({states:{components:[d(e),p(e),{componentName:e.componentName.mixInput,helperText:t("Enter the document URL. which supports TXT, Excel, Word, PowerPoint, and PDF files up to 100 MB."),id:"document-url",label:t("Document URL"),onChange:"SET_DOCUMENT_URL",path:"document.link",render:"IF_CONNECTION_SELECTED",required:!0,value:[]},{componentName:e.componentName.mixInput,helperText:t("Enter the caption you want to send with the Document."),id:"caption",label:t("Caption"),onChange:"SET_CAPTION",path:"document.caption",render:"IF_CONNECTION_SELECTED",value:[]},{componentName:e.componentName.mixInput,helperText:t("Enter the File Name you want to send with the Document."),id:"filename",label:t("File Name"),onChange:"SET_FILE_NAME",path:"document.filename",render:"IF_CONNECTION_SELECTED",value:[]}]},actions:{CONNECTION_ADD_CHANGE:r,HANDLE_BUSINESS_ID:E,IF_CONNECTION_SELECTED:({$:n})=>{var a;return c((a=n.getComponent("connection-id"))==null?void 0:a.value)},SET_CAPTION:o("caption"),SET_CONNECTION:o("connectionId"),SET_DOCUMENT_URL:o("documentUrl"),SET_FILE_NAME:o("fileName"),SET_PHONE_NUMBER_ID:N,SET_RECIPIENT_NUMBER:o("recipientNumber"),ON_MACHINE_LOAD:async({$:n})=>{m(n,[{db:"connectionId",id:"connection-id"},{db:"recipientNumber",id:"recipient-phone-number"},{db:"fileName",id:"file-name"},{db:"caption",id:"caption"},{db:"documentUrl",id:"document-url"}])}}}));export{s as default};
