var v=Object.defineProperty;var d=Object.getOwnPropertySymbols;var S=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var p=(t,e,s)=>e in t?v(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,f=(t,e)=>{for(var s in e||(e={}))S.call(e,s)&&p(t,s,e[s]);if(d)for(var s of d(e))N.call(e,s)&&p(t,s,e[s]);return t};import{v as y,w as C,r as m,j as a,S as T,_ as l}from"./main-40.js";import{b as k}from"./bf-132-75.js";import{I as E}from"./bf-94-335.js";import{h as u,c as L}from"./bf-428-401.js";import{T as _}from"./bf-595-402.js";import"./bf-200-122.js";import"./bf-689-131.js";function B({formFields:t,setIntegration:e,integrations:s,allIntegURL:x}){const h=y(),{id:c,formID:g}=C(),[n,o]=m.useState(f({},s[c])),[j,w]=m.useState(!1),[I,i]=m.useState({show:!1}),b=()=>{if(!L(n)){i({show:!0,msg:l("Please map mandatory fields")});return}k(s,e,x,n,h,c,1)};return a.jsxs("div",{style:{width:900},children:[a.jsx(T,{snack:I,setSnackbar:i}),a.jsxs("div",{className:"flx mt-3",children:[a.jsx("b",{className:"wdt-200 d-in-b",children:l("Integration Name:")}),a.jsx("input",{className:"btcd-paper-inp w-5",onChange:r=>u(r,n,o),name:"name",value:n.name,type:"text",placeholder:l("Integration Name...")})]}),a.jsx("br",{}),a.jsx(_,{formID:g,formFields:t,handleInput:r=>u(r,n,o),twilioConf:n,setTwilioConf:o,isLoading:j,setIsLoading:w,setSnackbar:i}),a.jsx(E,{edit:!0,saveConfig:b}),a.jsx("br",{})]})}export{B as default};
