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