import{h as d,g as S,$ as v,k as w,i as N,j as t,_ as i}from"./main.2.8.10.js";import{u as _,e as C,b as o}from"./react-router.DMwpH23k.js";import{S as k}from"./SnackMsg.7BjcJK1j.js";import{S as y,I as E,s as F}from"./Integrations.BFhED4ck.js";import{s as W,c as p}from"./WishlistMemberCommonFunc.D1BdzkaF.js";import{W as $}from"./WishlistMemberIntegLayout.B9HFH6TP.js";import"./react-vendor.P7K3d6op.js";import"./Note.DalStCGz.js";import"./CopyIcn.BnhKHfEP.js";import"./Table.DSsAy4VI.js";import"./index.DpWdl9V1.js";import"./ProUtilHelpers.CtRYkgop.js";import"./TagifyInput.C4ilRm4k.js";import"./lodash.DCvQBX3r.js";function K({allIntegURL:f}){const g=_(),{formID:u}=C(),[e,a]=d(S),[n,x]=d(v),r=w(N),[m,c]=o.useState(!1),[b,s]=o.useState({show:!1}),[h,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:b,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:h,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{K as default};
