import{u as j,k as S,d as m,r as o,h as _,j as e}from"./main-406.js";import{$ as b,g as I,h as w,d as C,_ as r,i as v,I as y,s as F}from"./bi.394.85.js";import{h as f,c as N}from"./bi.891.705.js";import{O as k}from"./bi.940.706.js";import"./bi.704.707.js";import"./bi.701.708.js";function A({allIntegURL:c}){const g=j();S();const[n,E]=m(b),[t,a]=m(I),[p,L]=o.useState(!1),[u,d]=o.useState({list:!1,field:!1,auth:!1,group:!1}),[x,s]=o.useState({show:!1}),l=_(w),h=()=>{if(!N(t)){s({show:!0,msg:r("Please map mandatory fields","bit-integrations")});return}F({flow:n,allIntegURL:c,conf:t,navigate:g,edit:1,setLoading:d,setSnackbar:s})};return e.jsxs("div",{style:{width:900},children:[e.jsx(C,{snack:x,setSnackbar:s}),e.jsxs("div",{className:"flx mt-3",children:[e.jsx("b",{className:"wdt-200 d-in-b",children:r("Integration Name:","bit-integrations")}),e.jsx("input",{className:"btcd-paper-inp w-5",onChange:i=>f(i,t,a),name:"name",value:t.name,type:"text",placeholder:r("Integration Name...","bit-integrations")})]}),e.jsx("br",{}),e.jsx(v,{entity:n.triggered_entity,setSnackbar:s}),e.jsx(k,{formID:n.triggered_entity_id,formFields:l,handleInput:i=>f(i,t,a),omniSendConf:t,setOmniSendConf:a,loading:u,setLoading:d,setSnackbar:s}),e.jsx(y,{edit:!0,saveConfig:h,disabled:t.field_map.length<1,isLoading:p,dataConf:t,setDataConf:a,formFields:l}),e.jsx("br",{})]})}export{A as default};
