import{h as p,g as j,$ as b,k as I,i as C,j as t,_ as d}from"./main.2.8.10.js";import{u as S,e as _,b as l}from"./react-router.DMwpH23k.js";import{S as w}from"./SnackMsg.7BjcJK1j.js";import"./Note.DalStCGz.js";import"./CopyIcn.BnhKHfEP.js";import{S as v,I as N,s as k}from"./Integrations.BFhED4ck.js";import{h as c}from"./KeapCommonFunc.BwjOCCrE.js";import{K as y}from"./KeapIntegLayout.C-AYkjlb.js";import"./react-vendor.P7K3d6op.js";import"./Table.DSsAy4VI.js";import"./index.DpWdl9V1.js";import"./TagifyInput.C4ilRm4k.js";import"./lodash.DCvQBX3r.js";function B({allIntegURL:f}){const g=S(),{id:E,formID:x}=_(),[e,s]=p(j),[n,u]=p(b),[i,r]=l.useState(!1),[h,a]=l.useState({show:!1}),m=I(C);return t.jsxs("div",{style:{width:900},children:[t.jsx(w,{snack:h,setSnackbar:a}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-200 d-in-b",children:d("Integration Name:","bit-integrations")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:o=>c(o,e,s),name:"name",value:e.name,type:"text",placeholder:d("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx(v,{entity:n.triggered_entity,setSnackbar:a}),t.jsx(y,{formID:x,formFields:m,handleInput:o=>c(o,e,s),keapConf:e,setKeapConf:s,isLoading:i,setIsLoading:r,setSnackbar:a}),t.jsx(N,{edit:!0,saveConfig:()=>k({flow:n,setFlow:u,allIntegURL:f,conf:e,navigate:g,edit:1,setIsLoading:r,setSnackbar:a}),disabled:e.field_map.length<2,isLoading:i,dataConf:e,setDataConf:s,formFields:m}),t.jsx("br",{})]})}export{B as default};
