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