import{h as d,g as b,$ as _,k as w,i as F,j as t,_ as n}from"./main.2.9.0.js";import{u as I,e as S,b as i}from"./react-router.DMwpH23k.js";import{S as v}from"./SnackMsg.DYSD96P4.js";import"./Note.NSUdvR3c.js";import"./CopyIcn.CEA_lFLo.js";import{S as N,I as k,s as y}from"./Integrations.DL8wqGct.js";import{h as E,F as L,c as $}from"./FluentCrmIntegLayout.OJJUsnz9.js";import"./react-vendor.P7K3d6op.js";import"./Table.BfF8RYFZ.js";import"./index.DpWdl9V1.js";import"./ActionProFeatureLabels.gUp7_RXn.js";import"./TagifyInput.KPPRQJ1B.js";import"./lodash.DCvQBX3r.js";function Q({allIntegURL:c}){const p=I(),{id:R,formID:f}=S(),[e,a]=d(b),[o,u]=d(_),r=w(F),[m,l]=i.useState(!1),[g,x]=i.useState({}),[h,s]=i.useState({show:!1}),C=()=>{if(!$(e)){s({show:!0,msg:n("Please map all required fields to continue.","bit-integrations")});return}y({flow:o,setFlow:u,allIntegURL:c,conf:e,navigate:p,edit:1,setIsLoading:l,setSnackbar:s})};return t.jsxs("div",{style:{width:900},children:[t.jsx(v,{snack:h,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:j=>E(j,e,a),name:"name",value:e.name,type:"text",placeholder:n("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx(N,{entity:o.triggered_entity,setSnackbar:s}),t.jsx(L,{formID:f,formFields:r,fluentCrmConf:e,setFluentCrmConf:a,isLoading:m,step:2,setIsLoading:l,loading:g,setLoading:x,setSnackbar:s}),t.jsx(k,{edit:!0,saveConfig:C,disabled:e.list_id===""||e.field_map.length<1,isLoading:m,dataConf:e,setDataConf:a,formFields:r}),t.jsx("br",{})]})}export{Q as default};
