var b=Object.defineProperty;var c=Object.getOwnPropertySymbols;var v=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var d=(e,t,s)=>t in e?b(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,f=(e,t)=>{for(var s in t||(t={}))v.call(t,s)&&d(e,s,t[s]);if(c)for(var s of c(t))N.call(t,s)&&d(e,s,t[s]);return e};import{D as y,g as C,r as m,j as a,S as T,_ as p}from"./main-634.js";import{a7 as k}from"./bf-746-82.js";import{I as E}from"./bf-942-184.js";import{a as u,c as L}from"./bf-12-183.js";import{T as _}from"./bf-837-226.js";import"./bf-275-83.js";import"./bf-822-108.js";import"./bf-25-81.js";import"./bf-438-114.js";function H({formFields:e,setIntegration:t,integrations:s,allIntegURL:x}){const g=y(),{id:l,formID:h}=C(),[o,i]=m.useState(f({},s[l])),[j,I]=m.useState(!1),[w,n]=m.useState({show:!1}),S=()=>{if(!L(o)){n({show:!0,msg:p("Please map mandatory fields")});return}k(s,t,x,o,g,l,1)};return a.jsxs("div",{style:{width:900},children:[a.jsx(T,{snack:w,setSnackbar:n}),a.jsxs("div",{className:"flx mt-3",children:[a.jsx("b",{className:"wdt-200 d-in-b",children:p("Integration Name:")}),a.jsx("input",{className:"btcd-paper-inp w-5",onChange:r=>u(r,o,i),name:"name",value:o.name,type:"text",placeholder:p("Integration Name...")})]}),a.jsx("br",{}),a.jsx(_,{formID:h,formFields:e,handleInput:r=>u(r,o,i),twilioConf:o,setTwilioConf:i,isLoading:j,setIsLoading:I,setSnackbar:n}),a.jsx(E,{edit:!0,saveConfig:S}),a.jsx("br",{})]})}export{H as default};
