import{h as d,g as h,$ as j,k as I,i as b,j as t,_ as f}from"./main.2.8.10.js";import{u as C,e as w,b as l}from"./react-router.DMwpH23k.js";import{S}from"./SnackMsg.7BjcJK1j.js";import"./Note.DalStCGz.js";import"./CopyIcn.BnhKHfEP.js";import{S as _,I as v,s as N}from"./Integrations.BFhED4ck.js";import{h as c,A as k,c as y}from"./AffiliateIntegLayout.BlmBdlK6.js";import"./react-vendor.P7K3d6op.js";import"./Table.DSsAy4VI.js";import"./index.DpWdl9V1.js";import"./TagifyInput.C4ilRm4k.js";import"./lodash.DCvQBX3r.js";function G({allIntegURL:p}){const x=C(),{formID:g}=w(),[e,s]=d(h),[o,A]=d(j),r=I(b),[i,m]=l.useState(!1),[u,a]=l.useState({show:!1});return t.jsxs("div",{style:{width:900},children:[t.jsx(S,{snack:u,setSnackbar:a}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-200 d-in-b",children:f("Integration Name:","bit-integrations")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:n=>c(n,e,s),name:"name",value:e.name,type:"text",placeholder:f("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx("br",{}),t.jsx(_,{entity:o.triggered_entity,setSnackbar:a}),t.jsx(k,{formID:g,formFields:r,handleInput:n=>c(n,e,s),affiliateConf:e,setAffiliateConf:s,isLoading:i,setIsLoading:m,setSnackbar:a}),t.jsx(v,{edit:!0,saveConfig:()=>N({flow:o,allIntegURL:p,conf:e,navigate:x,edit:1,setIsLoading:m,setSnackbar:a}),disabled:!y(e)||!e.statusId||!e.referralId||i,isLoading:i,dataConf:e,setDataConf:s,formFields:r}),t.jsx("br",{})]})}export{G as default};
