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