import{u as j,d as l,r as i,h as y,j as e}from"./main-406.js";import{$ as S,g as b,h as _,d as w,_ as o,i as C,I as v,W as F,s as N}from"./bi.394.85.js";import{h as k,c}from"./bi.145.928.js";import{S as E}from"./bi.594.929.js";function D({allIntegURL:m}){const f=j(),[a,L]=l(S),[t,n]=l(b),[g,r]=i.useState(!1),[p,x]=i.useState({}),[u,s]=i.useState({show:!1}),d=y(_),h=()=>{if(!c(t)){s({show:!0,msg:o("Please map mandatory fields","bit-integrations")});return}if(!t.selectedTag){F.error("Please select a Tag");return}N({flow:a,allIntegURL:m,conf:t,navigate:f,edit:1,setIsLoading:r,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:o("Integration Name:","bit-integrations")}),e.jsx("input",{className:"btcd-paper-inp w-5",onChange:I=>k(I,t,n),name:"name",value:t.name,type:"text",placeholder:o("Integration Name...","bit-integrations")})]}),e.jsx("br",{}),e.jsx(C,{entity:a.triggered_entity,setSnackbar:s}),e.jsx(E,{formID:a.triggered_entity_id,formFields:d,systemeIOConf:t,setSystemeIOConf:n,loading:p,setLoading:x,setIsLoading:r,setSnackbar:s}),e.jsx(v,{edit:!0,saveConfig:h,disabled:!c(t),isLoading:g,dataConf:t,setDataConf:n,formFields:d}),e.jsx("br",{})]})}export{D as default};
