import{h as d,g as S,$ as v,k as w,i as N,j as t,_ as i}from"./main.2.9.0.js";import{u as _,e as C,b as o}from"./react-router.DMwpH23k.js";import{S as k}from"./SnackMsg.DYSD96P4.js";import{S as y,I as E,s as F}from"./Integrations.DL8wqGct.js";import{s as W,c as p}from"./WishlistMemberCommonFunc.DbNMGuvC.js";import{W as $}from"./WishlistMemberIntegLayout.tJbrRyO0.js";import"./react-vendor.P7K3d6op.js";import"./Note.NSUdvR3c.js";import"./CopyIcn.CEA_lFLo.js";import"./Table.BfF8RYFZ.js";import"./index.DpWdl9V1.js";import"./ProUtilHelpers.CHf_DzPf.js";import"./TagifyInput.KPPRQJ1B.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};
