import{u as h,k as j,d as m,h as I,r as c,j as s}from"./main-406.js";import{g as v,$ as w,h as C,d as _,_ as l,i as y,I as M,s as N}from"./bi.394.85.js";import{M as S}from"./bi.977.827.js";import{h as f}from"./bi.344.828.js";import"./bi.704.707.js";import"./bi.701.708.js";function R({allIntegURL:p}){const u=h(),{formID:x}=j(),[e,t]=m(v),[o,k]=m(w),r=I(C),[n,d]=c.useState(!1),[g,a]=c.useState({show:!1});function b(){switch(e.mainAction){case"1":return e.statusId===void 0||e.gatewayId===void 0||e.selectedMembership===void 0;default:return!1}}return s.jsxs("div",{style:{width:900},children:[s.jsx(_,{snack:g,setSnackbar:a}),s.jsxs("div",{className:"flx mt-3",children:[s.jsx("b",{className:"wdt-200 d-in-b",children:l("Integration Name:","bit-integrations")}),s.jsx("input",{className:"btcd-paper-inp w-5",onChange:i=>f(i,e,t),name:"name",value:e.name,type:"text",placeholder:l("Integration Name...","bit-integrations")})]}),s.jsx("br",{}),s.jsx("br",{}),s.jsx(y,{entity:o.triggered_entity,setSnackbar:a}),s.jsx(S,{formID:x,formFields:r,handleInput:i=>f(i,e,t),memberpressConf:e,setMemberpressConf:t,isLoading:n,setIsLoading:d,setSnackbar:a}),s.jsx(M,{edit:!0,saveConfig:()=>N({flow:o,allIntegURL:p,conf:e,navigate:u,edit:1,setIsLoading:d,setSnackbar:a}),disabled:!e.mainAction||n||b(),isLoading:n,dataConf:e,setDataConf:t,formFields:r}),s.jsx("br",{})]})}export{R as default};
