import{h as d,g as j,$ as C,k as b,i as v,j as t,_ as l}from"./main.2.9.0.js";import{u as w,e as I,b as f}from"./react-router.DMwpH23k.js";import{S}from"./SnackMsg.DYSD96P4.js";import{S as _,I as N,s as y}from"./Integrations.DL8wqGct.js";import{v as A,h as F,W as k}from"./WCAffiliateIntegLayout.Dycb58Fv.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";import"./GlobalIntegrationHelper.B6YI8w_n.js";function J({allIntegURL:c}){const p=w(),{id:E,formID:g}=I(),[e,a]=d(j),[o,x]=d(C),n=b(v),[r,m]=f.useState(!1),[u,s]=f.useState({show:!1}),i=A(e);return t.jsxs("div",{style:{width:900},children:[t.jsx(S,{snack:u,setSnackbar:s}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-200 d-in-b",children:l("Integration Name:","bit-integrations")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:h=>F(h,e,a),name:"name",value:e.name,type:"text",placeholder:l("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx(_,{entity:o.triggered_entity,setSnackbar:s}),t.jsx(k,{formID:g,formFields:n,wcAffiliateConf:e,setWCAffiliateConf:a,setSnackbar:s,setIsLoading:m,isLoading:r}),t.jsx(N,{edit:!0,saveConfig:()=>{if(!i.isValid){s({show:!0,msg:i.message});return}y({flow:o,setFlow:x,allIntegURL:c,conf:e,navigate:p,edit:1,setIsLoading:m,setSnackbar:s})},disabled:!i.isValid,isLoading:r,dataConf:e,setDataConf:a,formFields:n}),t.jsx("br",{})]})}export{J as default};
