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