| 2 |
var T=Object.defineProperty;var k=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable;var l=(o,e,t)=>e in o?T(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t,m=(o,e)=>{for(var t in e||(e={}))S.call(e,t)&&l(o,t,e[t]);if(k)for(var t of k(e))f.call(e,t)&&l(o,t,e[t]);return o};import{F as E,g,r,j as s,S as h,e as y,_ as p,bi as A}from"./main-96.js";import{s as v}from"./bf-13-42.js";import{S as O}from"./bf-39-66.js";import{u as P}from"./bf-16-67.js";import"./bf-825-45.js";import"./bf-781-46.js";import"./bf-551-68.js";import"./bf-894-52.js";import"./bf-331-47.js";import"./bf-798-54.js";import"./bf-425-69.js";import"./bf-374-48.js";import"./bf-533-49.js";import"./bf-531-50.js";import"./bf-128-51.js";import"./bf-681-53.js";import"./bf-20-55.js";import"./bf-162-70.js";const R=r.lazy(()=>A(()=>import("./bf-771-65.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)),F={"Web Hooks":{name:"Web Hooks",envKey:"VITE_WEB_HOOKS_URL"},Zapier:{name:"Zapier Web Hooks",envKey:"VITE_ZAPIER_URL"},Integromat:{name:"Integromat Web Hooks",envKey:"VITE_INTEGROMAT_URL"},Integrately:{name:"Integrately WebHooks",envKey:"VITE_INTEGRATELY_URL"},Pabbly:{name:"Pabbly WebHooks",envKey:"VITE_PABBLY_URL"},"Zoho Flow":{name:"Zoho Flow Web Hooks",envKey:"VITE_ZOHO_FLOW_URL"},IFTTT:{name:"IFTTT Web Hooks"},N8NIO:{name:"n8n.IO Web Hooks"},"WP Webhooks":{name:"WP Webhooks Web Hooks"},FlowMattic:{name:"FlowMattic Web Hooks"},AutomatorWP:{name:"AutomatorWP Web Hooks"},"Uncanny Automator":{name:"Uncanny Automator Web Hooks"},"Automate Hub SperseIO":{name:"Automate Hub by Sperse.IO Web Hooks"},"Thrive Automator":{name:"Thrive Automator Web Hooks"},"Advanced Form Integration":{name:"Advanced Form Integration Web Hooks"},SureTriggers:{name:"SureTriggers Web Hooks"}},L=o=>{const e=F[o]||{name:o},t=(e.envKey,"");return{name:e.name,type:o,method:"POST",url:t}};function ee({mode:o="new",integType:e="Web Hooks",formFields:t,integrations:n,setIntegration:i,allIntegURL:_}){const b=E(),{id:u,formID:d}=g(),[H,c]=r.useState({show:!1}),[a,W]=r.useState(()=>o==="edit"?m({},n[u]):L(e));return P({conf:a,onSeed:I=>W(m({},I)),save:()=>{o==="edit"?v(n,i,_,a,b,u,1):v(n,i,_,a,b)},saveDisabled:!a.url,ready:!0}),s.jsxs("div",{children:[s.jsx(h,{snack:H,setSnackbar:c}),s.jsx(O,{title:p("Webhook"),subtitle:p("Where to send each submission."),children:s.jsx(r.Suspense,{fallback:s.jsx(y,{className:"g-c",style:{height:"50vh"}}),children:s.jsx(R,{formID:d,formFields:t,webHooks:a,setWebHooks:W,setSnackbar:c})})})]})}export{ee as default}; |