import{u as h,d as c,h as j,r as m,j as e}from"./main-406.js";import{g as I,$ as b,h as _,d as w,_ as r,i as v,I as y,s as C}from"./bi.394.85.js";import{M}from"./bi.796.836.js";import{h as p,c as N}from"./bi.483.837.js";import"./bi.704.707.js";import"./bi.701.708.js";function D({allIntegURL:f}){const g=h(),[t,a]=c(I),[n,S]=c(b),d=j(_),[l,i]=m.useState(!1),[u,s]=m.useState({show:!1}),x=()=>{if(!N(t)){s({show:!0,msg:r("Please map mandatory fields","bit-integrations")});return}C({flow:n,allIntegURL:f,conf:t,navigate:g,edit:1,setIsLoading:i,setSnackbar:s})};return e.jsxs("div",{style:{width:900},children:[e.jsx(w,{snack:u,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:o=>p(o,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(M,{formID:n.triggered_entity_id,formFields:d,handleInput:o=>p(o,t,a,i,s),mailupConf:t,setMailupConf:a,isLoading:l,setIsLoading:i,setSnackbar:s}),e.jsx(y,{edit:!0,saveConfig:x,disabled:!(t!=null&&t.listId),isLoading:l,dataConf:t,setDataConf:a,formFields:d}),e.jsx("br",{})]})}export{D as default};
