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