var b=Object.defineProperty;var c=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var d=(t,e,s)=>e in t?b(t,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[e]=s,f=(t,e)=>{for(var s in e||(e={}))v.call(e,s)&&d(t,s,e[s]);if(c)for(var s of c(e))N.call(e,s)&&d(t,s,e[s]);return t};import{G as y,g as C,r as m,j as a,S as T,_ as l}from"./main-343.js";import{a7 as k}from"./bf-659-81.js";import{I as E}from"./bf-58-184.js";import{a as u,c as L}from"./bf-166-183.js";import{T as _}from"./bf-167-226.js";import"./bf-974-82.js";import"./bf-649-79.js";import"./bf-594-113.js";function B({formFields:t,setIntegration:e,integrations:s,allIntegURL:x}){const g=y(),{id:p,formID:h}=C(),[o,n]=m.useState(f({},s[p])),[j,I]=m.useState(!1),[w,i]=m.useState({show:!1}),S=()=>{if(!L(o)){i({show:!0,msg:l("Please map mandatory fields")});return}k(s,e,x,o,g,p,1)};return a.jsxs("div",{style:{width:900},children:[a.jsx(T,{snack:w,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,o,n),name:"name",value:o.name,type:"text",placeholder:l("Integration Name...")})]}),a.jsx("br",{}),a.jsx(_,{formID:h,formFields:t,handleInput:r=>u(r,o,n),twilioConf:o,setTwilioConf:n,isLoading:j,setIsLoading:I,setSnackbar:i}),a.jsx(E,{edit:!0,saveConfig:S}),a.jsx("br",{})]})}export{B as default};
