import{u as _,k as b,d as l,h as w,r as n,j as e}from"./main-406.js";import{g as F,$ as I,h as v,d as S,_ as c,i as N,I as k,s as y}from"./bi.394.85.js";import{h as E,F as L,c as $}from"./bi.459.750.js";import"./bi.704.707.js";import"./bi.701.708.js";function T({allIntegURL:m}){const f=_(),{id:R,formID:u}=b(),[t,a]=l(F),[i,p]=l(I),o=w(v),[r,d]=n.useState(!1),[g,x]=n.useState({}),[h,s]=n.useState({show:!1}),C=()=>{if(!$(t)){s({show:!0,msg:"Please map all required fields to continue."});return}y({flow:i,setFlow:p,allIntegURL:m,conf:t,navigate:f,edit:1,setIsLoading:d,setSnackbar:s})};return e.jsxs("div",{style:{width:900},children:[e.jsx(S,{snack:h,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-5",onChange:j=>E(j,t,a),name:"name",value:t.name,type:"text",placeholder:c("Integration Name...","bit-integrations")})]}),e.jsx("br",{}),e.jsx(N,{entity:i.triggered_entity,setSnackbar:s}),e.jsx(L,{formID:u,formFields:o,fluentCrmConf:t,setFluentCrmConf:a,isLoading:r,step:2,setIsLoading:d,loading:g,setLoading:x,setSnackbar:s}),e.jsx(k,{edit:!0,saveConfig:C,disabled:t.list_id===""||t.field_map.length<1,isLoading:r,dataConf:t,setDataConf:a,formFields:o}),e.jsx("br",{})]})}export{T as default};
