import{b as d,h as S,$ as v,k as w,i as N,j as t,_ as i}from"./main.2.8.1.js";import{u as _,h as C,d as o}from"./react-router-dom.9mCuUg3q.js";import{S as k}from"./SnackMsg.S8DrwLlT.js";import{S as y,I as E,s as F}from"./Integrations.D2bgBas2.js";import{s as W,c as p}from"./WishlistMemberCommonFunc.BnmMgjU4.js";import{W as $}from"./WishlistMemberIntegLayout.GdNWFvPb.js";import"./Note.BeM7sN-p.js";import"./CopyIcn.3gZpHton.js";import"./Table.DAL7rcPQ.js";import"./index.wO-AxluA.js";import"./ProUtilHelpers.fQlR3mWW.js";import"./TagifyInput.Cu0YIRbG.js";import"./tagify.YxUZd8Ix.js";function J({allIntegURL:f}){const g=_(),{formID:u}=C(),[e,a]=d(S),[n,x]=d(v),r=w(N),[m,c]=o.useState(!1),[h,s]=o.useState({show:!1}),[b,j]=o.useState((e==null?void 0:e.name)||""),I=()=>{if(p(e)){s({show:!0,msg:i("Please map all required fields to continue.","bit-integrations")});return}F({flow:n,setFlow:x,allIntegURL:f,conf:e,navigate:g,edit:1,setIsLoading:c,setSnackbar:s})};return t.jsxs("div",{style:{width:900},children:[t.jsx(k,{snack:h,setSnackbar:s}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-200 d-in-b",children:i("Integration Name:","bit-integrations")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:l=>{j(l.target.value),W(l,a)},name:"name",value:b,type:"text",placeholder:i("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx(y,{entity:n.triggered_entity,setSnackbar:s}),t.jsx($,{formID:u,formFields:r,wishlistMemberConf:e,setWishlistMemberConf:a,isLoading:m,step:2,setIsLoading:c,setSnackbar:s}),t.jsx(E,{edit:!0,saveConfig:I,disabled:p(e),isLoading:m,dataConf:e,setDataConf:a,formFields:r}),t.jsx("br",{})]})}export{J as default};
