import{u as j,k as I,d as m,r as o,h as b,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 c,c as N}from"./bi.133.829.js";import{G as k}from"./bi.406.830.js";import"./bi.704.707.js";import"./bi.701.708.js";function A({allIntegURL:f}){const p=j();I();const[n,R]=m(_),[e,a]=m(w),[g,E]=o.useState(!1),[u,d]=o.useState({list:!1,field:!1,auth:!1,tags:!1}),[x,t]=o.useState({show:!1}),l=b(v),h=()=>{if(!N(e)){t({show:!0,msg:r("Please map mandatory fields","bit-integrations")});return}S({flow:n,allIntegURL:f,conf:e,navigate:p,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:i=>c(i,e,a),name:"name",value:e.name,type:"text",placeholder:r("Integration Name...","bit-integrations")})]}),s.jsx("br",{}),s.jsx(C,{entity:n.triggered_entity,setSnackbar:t}),s.jsx(k,{formID:n.triggered_entity_id,formFields:l,handleInput:i=>c(i,e,a),getResponseConf:e,setGetResponseConf:a,loading:u,setLoading:d,setSnackbar:t}),s.jsx(F,{edit:!0,saveConfig:h,disabled:!(e!=null&&e.campaignId),isLoading:g,dataConf:e,setDataConf:a,formFields:l}),s.jsx("br",{})]})}export{A as default};
