import{b as l,$ as h,h as j,k as S,i as b,j as t,_ as o}from"./main.2.8.1.js";import{u as y,h as _,d as c}from"./react-router-dom.9mCuUg3q.js";import{S as I}from"./SnackMsg.S8DrwLlT.js";import"./Note.BeM7sN-p.js";import{S as w,I as C,s as v}from"./Integrations.D2bgBas2.js";import{h as p,S as F,c as N}from"./SendyIntegLayout.BFDz-jRc.js";import"./CopyIcn.3gZpHton.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./TagifyInput.Cu0YIRbG.js";import"./tagify.YxUZd8Ix.js";import"./CustomFieldKey.V0UvzBSi.js";function H({allIntegURL:f}){const g=y(),{id:k}=_(),[n,E]=l(h),[e,a]=l(j),[r,d]=c.useState(!1),[x,s]=c.useState({show:!1}),m=S(b),u=()=>{if(!N(e)){s({show:!0,msg:o("Please map mandatory fields","bit-integrations")});return}v({flow:n,allIntegURL:f,conf:e,navigate:g,edit:1,setIsLoading:d,setSnackbar:s})};return t.jsxs("div",{style:{width:900},children:[t.jsx(I,{snack:x,setSnackbar:s}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-200 d-in-b",children:o("Integration Name:","bit-integrations")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:i=>p(i,e,a),name:"name",value:e.name,type:"text",placeholder:o("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx(w,{entity:n.triggered_entity,setSnackbar:s}),t.jsx(F,{formID:n.triggered_entity_id,formFields:m,handleInput:i=>p(i,e,a),sendyConf:e,setSendyConf:a,isLoading:r,setIsLoading:d,setSnackbar:s}),t.jsx(C,{edit:!0,saveConfig:u,disabled:e.field_map.length<1,isLoading:r,dataConf:e,setDataConf:a,formFields:m}),t.jsx("br",{})]})}export{H as default};
