import{h as l,$ as h,g as j,k as S,i as b,j as t,_ as o}from"./main.2.8.10.js";import{u as y,e as _,b as p}from"./react-router.DMwpH23k.js";import{S as I}from"./SnackMsg.7BjcJK1j.js";import"./Note.DalStCGz.js";import"./CopyIcn.BnhKHfEP.js";import{S as w,I as C,s as v}from"./Integrations.BFhED4ck.js";import{h as c,S as F,c as N}from"./SendyIntegLayout.B9u9VFPM.js";import"./react-vendor.P7K3d6op.js";import"./Table.DSsAy4VI.js";import"./index.DpWdl9V1.js";import"./TagifyInput.C4ilRm4k.js";import"./lodash.DCvQBX3r.js";import"./CustomFieldKey.DXUNVoDV.js";function J({allIntegURL:f}){const g=y(),{id:k}=_(),[n,E]=l(h),[e,a]=l(j),[r,d]=p.useState(!1),[x,s]=p.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=>c(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=>c(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{J as default};
