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