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