File: /var/www/html/wordpress/wp-content/plugins/bit-integrations/assets/bi.987.91.js
import{u as j,o as I,e as l,r as o,f as b,j as t}from"./main-685.js";import{$ as _,e as w,f as S,_ as r}from"./bi.878.0.js";import{S as v}from"./bi.674.13.js";import"./bi.451.455.js";import{S as y,I as C,s as F}from"./bi.776.3.js";import{h as f,c as N}from"./bi.534.876.js";import{G as R}from"./bi.630.877.js";import"./bi.327.9.js";import"./bi.601.11.js";import"./bi.825.14.js";import"./bi.463.750.js";import"./bi.768.751.js";import"./bi.666.752.js";function K({allIntegURL:p}){const c=j();I();const[i,k]=l(_),[e,a]=l(w),[g,E]=o.useState(!1),[u,m]=o.useState({list:!1,field:!1,auth:!1,tags:!1}),[x,s]=o.useState({show:!1}),d=b(S),h=()=>{if(!N(e)){s({show:!0,msg:r("Please map mandatory fields","bit-integrations")});return}F({flow:i,allIntegURL:p,conf:e,navigate:c,edit:1,setLoading:m,setSnackbar:s})};return t.jsxs("div",{style:{width:900},children:[t.jsx(v,{snack:x,setSnackbar:s}),t.jsxs("div",{className:"flx mt-3",children:[t.jsx("b",{className:"wdt-200 d-in-b",children:r("Integration Name:","bit-integrations")}),t.jsx("input",{className:"btcd-paper-inp w-5",onChange:n=>f(n,e,a),name:"name",value:e.name,type:"text",placeholder:r("Integration Name...","bit-integrations")})]}),t.jsx("br",{}),t.jsx(y,{entity:i.triggered_entity,setSnackbar:s}),t.jsx(R,{formID:i.triggered_entity_id,formFields:d,handleInput:n=>f(n,e,a),getResponseConf:e,setGetResponseConf:a,loading:u,setLoading:m,setSnackbar:s}),t.jsx(C,{edit:!0,saveConfig:h,disabled:!(e!=null&&e.campaignId),isLoading:g,dataConf:e,setDataConf:a,formFields:d}),t.jsx("br",{})]})}export{K as default};