import{u as j,d as c,r as o,h as b,j as t}from"./main-333.js";import{$ as I,g as _,h as w,d as y,_ as r,i as C,I as F,s as S}from"./bi.636.93.js";import{h as f,c as v}from"./bi.265.863.js";import{M}from"./bi.758.864.js";import"./bi.535.730.js";import"./bi.286.731.js";function P({allIntegURL:m}){const g=j(),[i,N]=c(I),[e,a]=c(_),[p,L]=o.useState(!1),[u,d]=o.useState({list:!1,field:!1,auth:!1,tags:!1}),[x,s]=o.useState({show:!1}),l=b(w),h=()=>{if(!v(e)){s({show:!0,msg:r("Please map mandatory fields","bit-integrations")});return}S({flow:i,allIntegURL:m,conf:e,navigate:g,edit:1,setLoading:d,setSnackbar:s})};return t.jsxs("div",{style:{width:900},children:[t.jsx(y,{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:n=>f(n,e,a),name:"name",defaultValue:e.name||"",type:"text",placeholder:r("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx(C,{entity:i.triggered_entity,setSnackbar:s}),t.jsx(M,{formID:i.triggered_entity_id,formFields:l,handleInput:n=>f(n,e,a),mailjetConf:e,setMailjetConf:a,loading:u,setLoading:d,setSnackbar:s}),t.jsx(F,{edit:!0,saveConfig:h,disabled:!(e!=null&&e.selectedLists),isLoading:p,dataConf:e,setDataConf:a,formFields:l}),t.jsx("br",{})]})}export{P as default};
