import{h as d,g as h,$ as j,k as b,i as _,j as t,_ as n}from"./main.2.9.0.js";import{u as w,b as l}from"./react-router.DMwpH23k.js";import{S as C}from"./SnackMsg.DYSD96P4.js";import"./Note.NSUdvR3c.js";import"./CopyIcn.CEA_lFLo.js";import{S as I,I as S,s as v}from"./Integrations.DL8wqGct.js";import{h as y,A as N,c as k}from"./AutonamiIntegLayout.I93tResP.js";import"./react-vendor.P7K3d6op.js";import"./Table.BfF8RYFZ.js";import"./index.DpWdl9V1.js";import"./TagifyInput.KPPRQJ1B.js";import"./lodash.DCvQBX3r.js";function B({allIntegURL:c}){const p=w(),[e,a]=d(h),[i,f]=d(j),o=b(_),[r,m]=l.useState(!1),[g,s]=l.useState({show:!1}),u=()=>{if(!k(e)){s({show:!0,msg:n("Please map all required fields to continue.","bit-integrations")});return}v({flow:i,setFlow:f,allIntegURL:c,conf:e,navigate:p,edit:1,setIsLoading:m,setSnackbar:s})};return t.jsxs("div",{style:{width:900},children:[t.jsx(C,{snack:g,setSnackbar:s}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-200 d-in-b",children:n("Integration Name:","bit-integrations")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:x=>y(x,e,a),name:"name",value:e.name,type:"text",placeholder:n("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),t.jsx(I,{entity:i.triggered_entity,setSnackbar:s}),t.jsx(N,{formID:i.triggered_entity_id,formFields:o,autonamiConf:e,setAutonamiConf:a,isLoading:r,step:2,setIsLoading:m,setSnackbar:s}),t.jsx(S,{edit:!0,saveConfig:u,disabled:e.field_map.length<1,isLoading:r,dataConf:e,setDataConf:a,formFields:o}),t.jsx("br",{})]})}export{B as default};
