import{u as j,k as b,d as l,h as w,r as d,j as e}from"./main-406.js";import{g as C,$ as I,h as _,d as v,_ as c,i as M,I as N,s as P}from"./bi.394.85.js";import{h as S,M as k,c as y}from"./bi.804.737.js";import"./bi.704.707.js";import"./bi.701.708.js";function D({allIntegURL:m}){const f=j(),{formID:p}=b(),[t,a]=l(C),[n,g]=l(I),i=w(_),[o,r]=d.useState(!1),[x,s]=d.useState({show:!1}),u=()=>{if(!y(t)){s({show:!0,msg:"Please map all required fields to continue."});return}P({flow:n,setFlow:g,allIntegURL:m,conf:t,navigate:f,edit:1,setIsLoading:r,setSnackbar:s})};return e.jsxs("div",{style:{width:900},children:[e.jsx(v,{snack:x,setSnackbar:s}),e.jsxs("div",{className:"flx mt-3",children:[e.jsx("b",{className:"wdt-200 d-in-b",children:c("Integration Name:","bit-integrations")}),e.jsx("input",{className:"btcd-paper-inp w-6",onChange:h=>S(h,t,a),name:"name",value:t.name,type:"text",placeholder:c("Integration Name...","bit-integrations")})]}),e.jsx("br",{}),e.jsx("br",{}),e.jsx(M,{entity:n.triggered_entity,setSnackbar:s}),e.jsx(k,{formID:p,formFields:i,mailPoetConf:t,setMailPoetConf:a,isLoading:o,step:2,setIsLoading:r,setSnackbar:s,edit:t.lists}),e.jsx(N,{edit:!0,saveConfig:u,disabled:t.lists===""||t.field_map.length<1,isLoading:o,dataConf:t,setDataConf:a,formFields:i}),e.jsx("br",{})]})}export{D as default};
