import{u as j,d as f,r as o,h as I,j as t}from"./main-406.js";import{$ as _,g as b,h as w,d as C,_ as r,i as y,I as F,s as S}from"./bi.394.85.js";import{h as m,c as v}from"./bi.9.938.js";import{M}from"./bi.836.939.js";import"./bi.704.707.js";import"./bi.701.708.js";function P({allIntegURL:c}){const g=j(),[n,N]=f(_),[e,a]=f(b),[p,k]=o.useState(!1),[u,l]=o.useState({auth:!1,fields:!1,lists:!1,tags:!1}),[x,s]=o.useState({show:!1}),d=I(w),h=()=>{if(!v(e)){s({show:!0,msg:r("Please map mandatory fields","bit-integrations")});return}S({flow:n,allIntegURL:c,conf:e,navigate:g,edit:1,setLoading:l,setSnackbar:s})};return t.jsxs("div",{style:{width:900},children:[t.jsx(C,{snack:x,setSnackbar:s}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-200 d-in-b",children:r("Integration Name:","bit-integrations")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:i=>m(i,e,a),name:"name",defaultValue:e.name||"",type:"text",placeholder:r("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx(y,{entity:n.triggered_entity,setSnackbar:s}),t.jsx(M,{formID:n.triggered_entity_id,formFields:d,handleInput:i=>m(i,e,a),mailsterConf:e,setMailsterConf:a,loading:u,setLoading:l,setSnackbar:s}),t.jsx(F,{edit:!0,saveConfig:h,isLoading:p,dataConf:e,setDataConf:a,formFields:d}),t.jsx("br",{})]})}export{P as default};
