import{b as d,h,$ as j,k as b,i as _,j as t,_ as n}from"./main.2.8.1.js";import{u as w,d as l}from"./react-router-dom.9mCuUg3q.js";import{S as C}from"./SnackMsg.S8DrwLlT.js";import"./Note.BeM7sN-p.js";import{S as I,I as S,s as v}from"./Integrations.D2bgBas2.js";import{h as y,A as N,c as k}from"./AutonamiIntegLayout.ffjezF7I.js";import"./CopyIcn.3gZpHton.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./TagifyInput.Cu0YIRbG.js";import"./tagify.YxUZd8Ix.js";function z({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{z as default};
